Apache virtual directories not quite working for base FQDN
Dotan Cohen
dotancohen at gmail.com
Fri Oct 8 14:35:45 UTC 2010
On an Ubuntu 9.10 install I have a virtual host that works fine if
there is a GET argument or path after the FQDN / IP address, but not
if the FQDN / IP address is entered by itself. If there is an argument
or path, then Apache correctly fetches the pages from the the right
place. If the FQDN / IP address appears by itself, then Apache fetches
the default "It works!" page. See here:
See these examples:
http://212.179.246.18/?d
http://212.179.246.18/
http://uk.sharingcenter.de/?d
http://uk.sharingcenter.de/
The relevant config file:
$ cat /etc/apache2/sites-available/default
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot /var/www/default_public_html
</VirtualHost>
<VirtualHost *:80>
ServerName uk.sharingcenter.de
DocumentRoot /var/www/uk-sharsharingcenter-de/public_html
</VirtualHost>
The file /var/www/default_public_html/index.html has the text "Hello, world!".
The file /var/www/uk-sharsharingcenter-de/index.html has the text "uk".
Any ideas why Apache is giving the "It works!" [age when there is no
argument / path? Thanks.
Karl, please don't answer. Thanks.
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com
More information about the ubuntu-users
mailing list