httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Bascietto <i...@bask.it>
Subject [users@httpd] Name based Virtual Hosting
Date Fri, 19 Mar 2004 18:07:20 GMT
Hello all,

I am having a very trivial problem with NMVH. Apache is a rather new 
land for me and I can't figure out what I am doing wrong, even after 
reading FAQ and manuals.
Basically I want to set up 2 NMVH to make apache point to 2 sites I have 
on my local machine.
What I have done:
1. added the domains www.foo1.com and www.foo2.com to the hosts file, it 
now looks like this:
127.0.0.1        localhost.localdomain localhost www.foo1.com www.foo2.com

2. added 2 VH to httpd.conf:
NameVirtualHost http://localhost:80
<VirtualHost http://localhost>
    ServerName www.foo1.com
    DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost  http://localhost>
    ServerName www.foo2.com
    DocumentRoot /home/bask/documents/sites/foo2
</VirtualHost>

3. called both http://www.foo1.com and http://www.foo2.com from the 
browser. They both point to /var/www/html, the DocumentRoot of the first VH.
The question is: how can I activate the second VH?

And secondly, when the second VH will work:
a. what kind of file permissions should I give to its DocumentRoot? the 
same owner:group as defined in httpd.conf?
b. how can I make apache see the files in the DocumentRoot?

Thank you!

--
marco



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