httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jessica Rasku <jra...@armispiansystems.ca>
Subject Re: [users@httpd] No Luck wuth VirtualHosts
Date Thu, 06 Oct 2005 22:33:35 GMT
kloomis wrote:
> 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?)

Yes I believe you do.  Though it maybe should go through a DNS server, 
but this isn't a live domain.  So that will work.

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

I'm not totally with it, though it should work from what I'm seeing 
there.  Are you restarting the server after every change?  Apache only 
reads the config file when it starts up, or when it recieves a SIGHUP (I 
think that's right).  So you need to be sure you're doing that.

						Jessica

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