[thelist] apache virtual hosts

// kerin | airside.co.uk kerin at airside.co.uk
Sat Jan 5 13:09:09 CST 2002


Thanks a lot, that did the trick.

But now I've got another (more minor) problem.

My virtual host block now looks like this :



NameVirtualHost 62.49.5.212

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster at dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 62.49.5.212>
        ServerName dev.airside.co.uk
        ServerAlias dev
        DirectoryIndex index.html
        DocumentRoot /www/servers/airside
</VirtualHost>

<VirtualHost 62.49.5.212>
        ServerName music.airside.co.uk
        ServerAlias music
        DocumentRoot /www/servers/music
</VirtualHost>



And apache redirects requests accordingly. But, it now looks for
index.php3 as the default index page, despite the fact that I also have
this in my httpd.conf file :

<IfModule mod_dir.c>
    DirectoryIndex index.html index.shtml index.php index.php3
</IfModule>


Before I enabled virtual hosts, Apache would correctly look for
index.html, then .shtml, .php, .php3, in that order. Now it seems to
ignore everything other than php3 files. Thats fine for
music.airside.co.uk, and the index page is index.php3, but
dev.airside.co.uk's index page is index.html. So, http://
dev.airside.co.uk gives "index.php3 could not be found), but http://
dev.airside.co.uk/index.html works.

What am I overlooking this time?


>At 03:45 PM 1/4/2002, mbox937 at pop3.proteusweb.com wrote:
>>As far as I can make out my httpd.conf file is fine.
>
>This is what you sent last time:
>
>NameVirtualHost 127.0.0.1
>
><VirtualHost 127.0.0.1>
>         ServerName music.airside.co.uk
>         ServerAlias music
>         DocumentRoot /www/servers/music
></VirtualHost>
>
>You need to change this to the actual IP the rest of the network see the 
>machine as (62.49.5.212).
>
>
>
>
>---
>Anthony Baratta
>President
>Keyboard Jockeys
>
>"Conformity is the refuge of the unimaginative."





More information about the thelist mailing list