I have a test deployment: Server version: Apache/2.2.12 with a number of
virtual hosts. All work fine without any issues, and have done so for
quite some time.

Today I wanted to add a named virtual host called 'testbed.local'. This
is resolvable in the local lan using a local name server (rather than
messing around with several host files) and works flawlessly, giving the
correct IP in return to dig.

Deployment of the testbed.local fails. Apache is seeing the host header
'testbed.local', but it refuses to serve up that virtual host, instead
giving the default site. 

Here is a log excerpt with the host header enabled at field 5:
192.168.1.22 - - [12/Feb/2011:16:10:03 +0000] "testbed.local" "GET
index.html HTTP/1.1" 404 510 "-" "agent snipped"

And this is the NVH declaration:
<VirtualHost *:80>
        ServerName testbed.local
        DocumentRoot /var/www/testbed/htdocs
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/testbed/htdocs/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /var/www/testbed/cgi-bin/
        <Directory "/var/www/testbed/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/www/testbed/logs/error.log
        CustomLog /var/www/testbed/logs/access.log combined
</VirtualHost>



If I drop of the '.local' from the ServerName directive, and change
(back) to using hostfiles the virtual host works as intended.

Am I missing something obvious (like Apache won't wear .local as a tld),
is this a 'feature/bug' or am I missing something?

The reason I want to do this (testbed.local) is purely to allow DNS to
resolve 'testbed.local' to my test Apache. I'm not keen (and I'm not
sure it would even work) to have BIND have a zone for 'testbed' without
some psuedo local domain - so resolving this would be wonderful.

I've tried searching the archives, but searching for anything with a dot
in it, even if surrounded by quotes, gives no answer or pointers.
Equally the docs for Name Virtual Hosts just give examples.....

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>

....without mention of what it considers to be valid TLD's, so any
pointers on this would be helpful.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to