Forum Moderators: phranque

Message Too Old, No Replies

vhost not working on apache v2.2.0

request goes to first vhost no matter what

         

greghorne

4:19 pm on Apr 1, 2006 (gmt 0)



I am running Apache v2.2.0 on fedoracore5.

I set up two vhosts as follows, but the browser request only returns the first vhost index.html.

Can anyone see what is causing this problem?

Thanks for your help in advance.

NameVirtualHost *:80

#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# 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 *:80>
# ServerAdmin webmaster@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 *:80>
DocumentRoot /var/www/html/gregweb
ServerName www.example.net
<Directory "/var/www/html/gregweb">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/home/asknicolas/www"
ServerName www.quux-foo.com
<Directory "/home/asknicolas/www">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

[edited by: jdMorgan at 4:39 pm (utc) on April 2, 2006]
[edit reason] Obscured specifics per TOS. [/edit]