Welcome to WebmasterWorld Guest from 54.167.29.212

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

VirtualServer problem

problem with multiple Named VirtualServer s

     

mAgnim

12:16 am on Jul 23, 2005 (gmt 0)

10+ Year Member



I am currently running a server with 2 Name virtual host sites, and and I want to add a 3rd.

However, just copying the directives from one of the 2 sites already operation, and editing the appropriate sections isn't working. It keeps resolving back to the first site

Here are the directives for the 2 operational sites:

<VirtualHost 192.168.1.102:80>
ServerAdmin webmaster@mydomain.org
DocumentRoot /var/www/html
ServerName www.mydomain.org
ErrorLog /var/log/httpd/mydomain-error.log
<Directory "/var/www/html">
allow from all
Options All Includes Indexes
</Directory>
</VirtualHost>

<VirtualHost 192.168.1.102:80>
ServerAdmin webmaster@mydomain.org
DocumentRoot "/var/www/site2"
ServerName site2.mydomain.org
ErrorLog /var/log/httpd/site2-error.log
<Directory "/var/www/site2">
allow from all
Options +Indexes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order allow,deny
Deny from all
</LimitExcept>
</Directory>
</VirtualHost>

This is the 3rd one that I wish to add (totally different domain name, which has also been added to my /etc/hosts file):
<VirtualHost 192.168.1.102:80>
ServerAdmin webmaster@domain2.net
DocumentRoot /var/www/dam
ServerName www.domain2.net
ServerAlias domain2.net
ErrorLog /var/log/httpd/domain2-error.log
<Directory "/var/www/domain2">
allow from all
Options +Indexes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order allow,deny
Deny from all
</LimitExcept>
</Directory>
</VirtualHost>

mAgnim

8:05 am on Jul 23, 2005 (gmt 0)

10+ Year Member



Running httpd2 -S returns syntax OK, and lists all the intended virtual servers

rharri

9:19 pm on Jul 27, 2005 (gmt 0)

10+ Year Member



Aren't the document root and directory supposed to be the same?

Bob

mAgnim

3:10 am on Jul 28, 2005 (gmt 0)

10+ Year Member



My mistake in editing...they are in fact the same.
/var/www/dam is the real name of the directory, and is the DocumentRoot

...I was editing the post to substitute domain2 and missed that line :P