Out Of File Handles Because Of ErrorLogs In Vhosts
Mar 16, 2008
I have hundreds of sites on a server running Plesk. When I try to add more, Apache refuses to start, because it is out of file handles.
It is out of file handles because Plesk includes a custom ErrorLog and CustomLog in every vhost config file it makes. I tried overriding them with a vhost.conf file, but am not sure how to unset set options. I also tried pointing all the same ErrorLogs to the same file, but that didn't seem to do anything.
Does anyone know how I can either log everything to a single file, or just shut off logging? I really never use logging, and it seems like it would save me progressing power and storage (not to mention file handles!) if I could just disable it.
I work for a start up as well as do independent consulting. I had a friend set up my apache server initially for the start up. It's been running fine. Now I want to host a client's site on the same server. I tired just adding a vhost section at the bottom of the conf file, but it said that I was running two sites off the same port. I tried manipulating the stuff my buddy did for me for the first site, then putting two vhosts on the bottom, but that just didn't work.
I've decided to move from my current provider (which I have praised many times on this forum before) because I'm just not getting the service I expect.
I'm specifically interested in a provider who is able to upgrade a VPS quickly, efficiently and on time, with no excuses and without "forgetting" things.
If you have experienced more than one upgrade with a provider which has been handled exceptionally well, please point me in the right direction.
Every request is getting processed 3 times. In other words, if I point my browser to the URL of an image hosted on this server, it generates 3 lines in the access log each time I refresh the page.
If I point it to a script which logs something to a file, it logs it 3 times, showing it's run all 3 times.
I haven't touched the httpd.conf or any other configuration. Any idea what could cause this?
One of the sites I run is a forum with a political component, and 4-5 times over the last week we've been seeing DoS attacks. They're not terribly sophisticated -- generally 1-3 compromised servers throwing packets my way -- but they're enough to clog my pipes and take my sites down.
What I'd like to do is put a new server up at a data center that's D(D)oS aware that can hopefully respond to these attacks automatically. My current provider has been giving solid support, but the best they can do is null route the affected IP, rather than filtering the incoming attack.
Can y'all name a few providers I should look into? Right now I'm just looking to move 1 box (or maybe a box and a firewall depending on the setup).
I've been having some trouble with Apache 2.0 recently. Whenever I load somewhere between 200 and 230 virtual hosts into Apache's config (as per my hosting control panel), Apache will fail to restart when the command "apache2ctl restart" is run. The command "/etc/init.d/apache2 restart" fails as well. All it does is signal all child processes of Apache to be terminated and fail to start again.
Here's what the log has to say:
Code: [Tue Nov 13 19:04:18 2007] [notice] SIGHUP received. Attempting to restart [Tue Nov 13 19:04:18 2007] [notice] seg fault or similar nasty error detected in the parent process Is it that Apache is too bloated with vhosts to restart or is it something else?
<VirtualHost xxx.xxx.xxx.xxx:80> ServerAdmin cs@reflexnetworks.net DocumentRoot /home/reflextest/public_html <Directory "/home/reflextest/public_html"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ServerName test.reflexnetworks.net ServerAlias www.test.reflexnetworks.net ErrorLog logs/test.reflexnetworks.net-error_log CustomLog logs/test.reflexnetworks.net-access_log common </VirtualHost> ( xxx.xxx.xxx.xxx is the correct IP). The <Directory "/home/reflextest/public_html">...</Directory> part does not make any difference
Permissions: Code: ls -lR reflextest/ reflextest/: total 4 drwxr-xr-x 2 reflextest apache 4096 Mar 25 04:50 public_html
reflextest/public_html: total 4 -rw-r--r-- 1 reflextest apache 22 Mar 25 04:50 index.html This is a source compile of apache. See for yourself: [url]
I tried searching the forums a bit and the Apache manual, but I was unable to find much related to my specific problem.
We have a system such that each user has a 'www' folder in their home directory so that example.com/~user will point to that folder. The user information, however, is not on the www server and instead we use a network file system to access the files in the home folder.
This all works fine and dandy with mod_rewrite. However, we want to allow each user to have access to the error logs, etc. for their own site. The best way to do this seems to simply store it in their home directory.
The problem is that how do you split these files apart. While it would be possible to have a separate process do it, the best way seems to just have each user be their own vhost. mod_vhost_alias seems to be applicable in this situation.
However, mod_vhost_alias relies on either the Host: field or the ip to split queries into their respective vhosts. As said before, our system uses the directory.
So the question is, is there a way to either use mod_rewrite to tell mod_vhost_alias what the vhost's name is. Or, is there a way to split the logs another way.
I have a Problem with my VHosts on one of two IP addresses. One IP is dedicated and works well
The other IP is shared. Since two days every call to one of the websites of this share ip goes to the Plesk Default Website. I tried to reconfigure single sites and all sites (/usr/local/psa/admin/bin/httpdmng --reconfigure-all), nothing works and restarting apache shows some warnings.
apache2ctl -S shows the following lines:
Code:
[Mon Dec 01 19:56:08 2014] [warn] VirtualHost 85.214.41.141:7080 overlaps with VirtualHost 85.214.41.141:7080, the first has precedence, perhaps you need a NameVirtualHost directive [Mon Dec 01 19:56:08 2014] [warn] VirtualHost 85.214.41.141:7081 overlaps with VirtualHost 85.214.41.141:7081, the first has precedence, perhaps you need a NameVirtualHost directive
[Code] ....
In an other thread I found a possible solution for the overlapping vhosts. The problem there seems to be a missing ssl-certificate and that matches with the situation on my server. After copying any other certificate-file as the one with the missing filename the apache starts without any warnings, but after that all websites (the sites from the dedicated ip too) only shows the apache default site ("it works"). I Tried to reconfigure single sites and all sites (/usr/local/psa/admin/bin/httpdmng --reconfigure-all), nothing works.
The server is hosted by STRATO, so there are daily backups. I turned back one week (the problem exists since two days). Then for some hours all works fine but suddenly all the sites on the ip 85.214.41.141 get broken again and shows only plesks default page.
if it was possible to load vhosts from a MySQL database and the only solutions i found didnt work for me. Im running Apache on Windows. Has anyone seen anything that would work with Windows? The only alternative i can think of is to read the database info using PHP and output it to a vhosts config file. I dont want to do that though because it means restarting the server to load the new config and i hear that a lot of vhosts slows the server down
We are using a server with Ubuntu 14.04 LTS and Plesk 12. When installing plesk, the vhosts directory is automatically created in /var/www/vhosts . Our problem is that /var is on a 120 GB SSD drive. We would like to move it to /data, which is a 2 TB drive. Whenever we used:
This KB-Article [URL] .... (exits with errors) this third-party documentation [URL] .... (Which is from a user who has the exact same problem with the same paths) all we get is ERROR 403 on our demo site. The site was created before the move and we also tried to create it after the move. The Plesk installation is fresh out of the box. There were absolutely no changes to the installation. Even the domain default or server default pages will not load anymore.
From what I can tell the vhosts on my Plesk Panel keep resetting (I think around once a day), all my webstatistics (AWStats) begin to 404 and I have a Wordpress installed in the root of a domain which is now displaying the "Web Server's Default Page" (any sub-directory of the Wordpress install gives a 404 such as the wp-admin directory). The way I've fixed this temporarily is to run "%plesk_cli%
epair.exe" --update-vhosts-structure. I do not see any errors or warnings in the event viewer or log files.
On another note is there a way to increase the logging for event viewer to include more than just errors (such as informational) to make it easier to track down issues?
I'm trying to configure a host to use vhosts but the server keeps breaking when I uncomment the Include vhosts file line. The apache process starts but none of the hostnames work. When the line is commented out, only the main hostname (defined in httpd.conf) works.
We run a high traffic server and the access logs get filled up very quick. I know we could implement rotation, but I would also like to prevent performance loss by having an access log, doesnt matter how marginal that would be.
Rapidly growing error logs showing the same message
$ug-non-zts-20020429/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429//usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429 ./ ../ eaccelerator.so* root@server [~]# ls /usr/local/lib/php/extensions/no-debug-non-zts-20020429 ./ ../ eaccelerator.so*
i manage linux apache webserver with a few wordpress blogs and from time to time i see someone inject a malicious .php file into wp-content/uploads/2014/10/ directory.
i think its some bad plugin or theme, but these is more blogs, i ugrade, update, WP, but
how can i setup some monitor to tell me which php file (or even line in php file) injected that malicious .php ? I have linux root access so i can setup anything
I'd like you " to move my web sites that I have in a FTD file from were it is now to GoDaddy? I have the accounts already set up all that has to happen is the move."
I must confess that I have no clue what he means by FTD file. What am I missing?
BTW, I have Googled it with no results that make sense to me.