httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kloomis <kloo...@it-resources.com>
Subject [users@httpd] No Luck wuth VirtualHosts
Date Thu, 06 Oct 2005 22:16:18 GMT
Hello:

I'm having no luck with virtual hosts.

I have a domain name: myDomain.com and a sub-domain name: test.myDomain.com

I would like myDomain.com to go to /var/www/sites/prod and 
test.myDomain.com to go to /var/www/sites/dev

My hosts file reads: 127.0.0.1 myDomain.com localhost.localdomain localhost 
asus
(do I need a test.myDomain.com in here?)

My httpd.conf has this:

listen 80
ServerName myDomain.com:80
NameVirtualHost *:80
<VirtualHost *:80>
	DocumentRoot /var/www/sites/prod
	ServerName myDomain.com
</VirtualHost>

<VirtualHost *:80>
	DocumentRoot /var/www/sites/dev
	ServerName test.myDomain.com
</VirtualHost>

What happens is that either test.myDomain.com or myDomain.com go to the 
first VirtualHost whichever one I put first.

What am I missing?

Thanks,

Ken

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