How to get virtual hosts to work…
Here’s what I have in httpd.conf (Apache, SuSE Linux):
NameVirtualHost *ServerName www.domain1.com DocumentRoot /usr/local/httpd/htdocs/domain1 ServerName www.domain2.com DocumentRoot /usr/local/httpd/htdocs/domain2 ServerName www.domain3.com DocumentRoot /usr/local/httpd/htdocs
I want documents served from the directories ..domain1, 2, or 3 depending on the URL used to get to the server.
With the above .conf entries, everything comes from the directory domain1 no matter what URL is used.
What’s wrong?