[users@httpd] Question regarding VirtualHosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux