[users@httpd] Name-based virtual hosts not working as expected

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

 



Hello!

I must have misunderstood something in the docs. The following is not
working as I expect it to.

In httpd.conf:

NameVirtualHost *:80
Include conf/otherdomain.conf
Include conf/mydomain.conf


In mydomain.conf:

<VirtualHost *:80>
  ServerName www.mydomain.com
  ServerAlias mydomain.com
  DocumentRoot /var/www/html
</VirtualHost>

# Other stuff
<VirtualHost *:80>
  ServerName other.mydomain.html
  DocumentRoot /var/www/other
</VirtualHost>

# Catch all other domains
<VirtualHost *:80>
  ServerName www.mydomain.com
  ServerAlias *.mydomain.com
  DocumentRoot /var/www/html
</VirtualHost>


In otherdomain.conf:

<VirtualHost *:80>
  ServerName otherdomain.com
  ServerAlias otherdomain.com www.otherdomain.com *.otherdomain.com
  DocumentRoot /var/www/konova
</VirtualHost>


mydomain.com works correctly. So does otherdomain.com. However,
www.otherdomain.com points to www.mydomain.com.


Can anybody see where I'm going wrong?

Thank you!
David




---------------------------------------------------------------------
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