Apache Help

Brian Densmore DensmoreB at ctbsonline.com
Thu Feb 28 19:51:55 CST 2002


Umm... Mike what I said about the DocumentRoot lines, I meant to say
ServerPath.
Also I think the second and any subsequent domains need the ServerAlias
line added.
Also you'll need appropriate DNS entries of course.

In my config, I have these lines:
Listen 80
Listen 8080
Listen 443
...
BindAddress *
...
UseCanonicalName on
...
HostnameLookups on
...
NameVirtualHost <ip address>:80
<VirtualHost domain1.net:80>
ServerName domain1.net
DocumentRoot /var/www/html
...
</VirtualHost>
 
<VirtualHost domain2.org:80>
ServerName domain2.org
DocumentRoot /var/www/html/domain2
ServerAlias domain2.org
...
</VirtualHost>

<VirtualHost domain2.org:443>
ServerName domain2.org
DocumentRoot /var/www/html/domain2
ServerAlias domain2.org
...
</VirtualHost>

<VirtualHost domain1.net:8080>
ServerName domain1.net
DocumentRoot /var/www/html
...
</VirtualHost>
 
Brian

> -----Original Message-----
> From: Michael Pratt [mailto:mtpratt1971 at hotmail.com]
> Sent: Thursday, February 28, 2002 11:56 AM
> To: kclug at kclug.org
> Subject: Apache Help
> 
> 
> I am trying to set up multiple domains using one IP  I have 
> this in my 
> httpd.conf
> 
> NameVirtualHost <DSL IP ADDRESS>
> 
> <VirtualHost domain1.net>
> DocumentRoot /var/www/html
> ServerName domain1.net
> </VirtualHost>
> 
> <VirtualHost domain2.org>
> DocumentRoot /var/www/html/domain2
> ServerName domain2.org
> </VirtualHost>
> 
> The problem I have is no matter what domain I put in it goes 
> to domain1.net
> 
> how can I set Apache up to point Domain1 to /var/www/html and 
> Domain2 to 
> /var/www/html/domain2?
> 
> 
> Thanks!
> 
> Mike
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> 
> majordomo at kclug.org
> 




More information about the Kclug mailing list