General discussion
June 11, 2001 at 04:38 PM
sshears

Apache virtualHost

by sshears . Updated 24 years, 5 months ago

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?

This discussion is locked

All Comments