maximum number of vhosts?

Support for webhosts that use CentOS
Post Reply
Posts: 1
Joined: 2010/05/11 20:36:11

maximum number of vhosts?

Post by citrigin » 2010/07/15 16:56:50


I am running centos 5.4 x86_64 as a webserver with 82 name based virtual hosts. Each of these vhosts works fine. Problems arise when I add the 83rd vhost. The entry looks like this:

ServerAlias *
DocumentRoot /data/sites/friendsofcitynamezoo
ErrorLog /var/log/httpd/error_logs/error_logs/friendsofcitynamezoo_error_log
CustomLog /var/log/httpd/access_logs/access_logs/friendsofcitynamezoo_access_log combined

When I stop and start apache after adding this entry, apache will not restart. There are no references to any errors in the generic httpd error log, dmesg, or /var/log/messages about any errors.
Interestingly, when I comment out the ErrorLog and the CustomLog lines of the above entry, httpd restarts perfectly. Not knowing what the problem might be, I began looking at information on maximum file descriptors, but this does not seem to be the issue. Can anyone help me with this surprisingly stubborn issue?


Posts: 64
Joined: 2008/08/01 16:40:34

maximum number of vhosts?

Post by logan » 2010/08/03 22:57:53

To my knowledge Apache has no limit on vhosts. I've got 111 configured on a production box and 205 on a dev server at work, so the magic number isn't 83 anyway. :-) Commenting out Transfer/Custom/ErrorLog directives definitely sounds like you've got a problem with too many open files... You should check the [i]fs.file-max[/i] sysctl and ulimit.

Post Reply

Return to “CentOS 5 - Webhosting Support”