httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lyberg <martin.lyb...@gmail.com>
Subject [users@httpd] Question regarding VirtualHosts
Date Thu, 10 Nov 2005 19:52:23 GMT
Hi,

I'm running Apache 2.0 on FC4. I have two websites with two domains on
the same machine. The VirtualHosts work as it should when typing
domain1.com or domain2.com.

My question is:

I only want Apache to respond with the correct site if it hits on one
of the two VirtualHosts. If i type the ip of the webserver ie:
http://ip.ip.ip.ip i get to the first VH in list. How can make Apache
only to respond if the correct domains are searched for? That means,
if none of the VirtualHosts is matched, then don't serve any site at
all.

How can this be done? This is my conf:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /path/to/domain1
    ServerName domain1.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /path/to/domain2
    ServerName domain2.com
</VirtualHost>

Thank you!

/ Martin

---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message