I've got Apache configured with 336 Name Based Virtual hosts within a single apache configuration file. Each of these VirtualHosts is identically configured and resemble :

<VirtualHost *:80>
    DocumentRoot *docroot*
    ServerName *fqdn*
    <Directory *docroot*>
        AllowOverride All
    </Directory> </VirtualHost>

<VirtualHost *:80>
    ServerAdmin *admin email*
    DocumentRoot *default docroot*
        <Directory "*default docroot*">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory> </VirtualHost>

I've just added 4 new virtual hosts, and of those two are being completely ignored.

Checking the Apache access logs, I can see that the request is going through over the proper ServerName, but for some reason Apache won't dispatch properly. Nslookup is also returning the correct info.

Any ideas would be much appreciated.

  • When you say "won't dispatch properly", what does that mean exactly? Can you post the relevant log lines and config? – Sam Halicke Nov 25 '10 at 19:22
  • Doh, sorry about that, was annoyed and went on lunch. Didnt notice the configs got stripped out. – jonathanserafini Nov 25 '10 at 19:47
  • Instead of hitting the name virtualhost based on the relevant configuration entry, I'm simply hitting the default entry ( both wil be added to top post ) – jonathanserafini Nov 25 '10 at 19:47

Most likely a typo or something. Many problems get solved by reading the output apachectl configtest. This command is available on all commonly used versions of apache, including 1.3. See here.

  • Thanks for the response knitti. I did run that and received no errors ( Syntax OK ). Also not seeing any logging entries in the error log -_- ugh – jonathanserafini Nov 25 '10 at 20:20
  • Also no warnings? Missing document root? Overlapping domain names? – knitti Nov 25 '10 at 20:23
  • That's why I'm getting so frustrated, almost wonder if i'm hitting some sort of apache vhost limit. ( 336 name based port 80, about 200 SSLs ). The domain is quite unique, for shit's and giggles did "grep -r <first 5 characters of domain>" /etc/apache2 and only come up with the 1 vhost, ditto for the docroot. And yeah, document root exists, and has adequate permissions. – jonathanserafini Nov 25 '10 at 20:30
  • system limits, such as open files? What happens if you remove 2 other vhosts from the config, do the ignored ones become available? – knitti Nov 25 '10 at 20:40
  • hmm "lsof" returns 2063 active TCP ports and 702 open files which should be well within the limits of 1024 open files. I'll try to remove them after hours to see. Thanks for the help btw. – jonathanserafini Nov 25 '10 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.