apache httpd.conf VirtualHost: last entry overrides all others

apache httpd.conf VirtualHost: last entry overrides all others

Post by Cliff Landesm » Mon, 17 Nov 1997 04:00:00



I am having trouble successfully adding VirtualHost entries to
httpd.conf. Whatever entry is last determines the DocumentRoot
setting. The relevant section of my httpd.conf file looks like this:

<VirtualHost 207.254.90.13>

DocumentRoot /usr/local/etc/httpd/htdocs/library/gov/990/
ServerName www.form990.org
ErrorLog logs/form990.org-error_log
TransferLog logs/form990.org-access_log
</VirtualHost>

<VirtualHost 207.254.90.13>

DocumentRoot /usr/local/etc/httpd/htdocs/
ServerName www.nonprofits.org
ErrorLog logs/error_log
TransferLog logs/access_log
</VirtualHost>

This entry allows a web browser to find the home page for
www.nonprofits.org, but requesting " www.form990.org" simply finds the
same page. If I reverse the order of the entries, then both
www.nonprofits.org and www.form990.org go to the www.form990.org
subdirectory.

I have read the documentation on Virtual Hosting at www.apache.com,
and that says the order should not matter. Do I need to change the
/etc/hosts.allow or /etc/host.conf  file?

I am running  Apache Server version 1.0.5 on Linux.

Please reply to:

--Cliff

 
 
 

apache httpd.conf VirtualHost: last entry overrides all others

Post by Marc Slemk » Mon, 17 Nov 1997 04:00:00



Quote:>I am having trouble successfully adding VirtualHost entries to
>httpd.conf. Whatever entry is last determines the DocumentRoot
>setting. The relevant section of my httpd.conf file looks like this:

[...]

Quote:>I am running  Apache Server version 1.0.5 on Linux.

Upgrade.  1.0.5 is very ancient.  You are trying to use non-IP
based virtual hosts.  1.0.5 doesn't support that.

Use 1.2.4.

 
 
 

1. Default httpd.conf says Expected </VirtualHost> but saw </VirtualHost>

I apologise in advance if this is a stupid newbie question but it has me
stumped.

I've just upgraded from 1.2.6 to 1.3.1 with mod_ssl/SSLeay.

With no changes to the default conf files (which all look fine thanks to
the wonderful configuration script) the server starts fine without SSL
but gives me:

Expected </VirtualHost> but saw </VirtualHost>

with apachectl startssl.

Just for fun I added a virtual host which is setup on our local DNS.

<VirtualHost 203.34.243.10>

DocumentRoot /psci/usr/test
ServerName test.tcp.net.au
ErrorLog logs/test-error_log
TransferLog logs/test-access_log
</VirtualHost>

Now I get the Expected </VirtualHost> without SSL as well.

After being so proud of getting it all installed, I'm back down to
Earth. What have I done?

Thanks for your time,

Phil

2. error x010

3. apache httpd.conf servername overiding virtualhost setting of the same?

4. Netier SL2000 and Terminal Server.

5. Apache: User/Group directive in plain httpd.conf and VirtualHost

6. Netscape 3.01 Slow Startup

7. Test httpd.conf setup - using variables in httpd.conf

8. Routers and proxyies

9. httpd.conf servername overiding virtualhost setting of the same

10. translator from CERN httpd configuration rules to Apache httpd conf?

11. APACHE 1.1.1 httpd.conf and the "httpd -f ..." option

12. APACHE httpd.conf vs. httpsd.conf HELP !!!1

13. Apache .conf vs. NCSA httpd .conf