Click to See Complete Forum and Search --> : trouble getting Virtual hosts to work


alanyoung1979
10-18-2000, 09:31 PM
Here is my httpd.conf file with the relevant part:

DocumentRoot /home/httpd/html/
#if I don't have this bit it won't serve any pages properly

NameVirtualHost 216.200.132.35

#the subdomain that I want to have work and is setup on a DNS and works.

<VirtualHost 216.200.132.35>
ServerName webmail.5150online.com
ServerAlias webmail.5150online.com
DocumentRoot /home/httpd/html/mail/
</VirtualHost>

#my main website.
<VirtualHost 216.200.132.35>
ServerName www.5150online.com (http://www.5150online.com)
ServerAlias www.5150online.com (http://www.5150online.com)
DocumentRoot /home/httpd/html/
</VirtualHost>

but I can't get it to display the .html files in the webiste for webmail, unless I give it the path www.5150online.com/mail (http://www.5150online.com/mail)
Im not to sure if the second Virtual host is redundant but the same thing ocures when it is not in the httpd.conf file. I have apache 1.3.12 on mandrake 7.1

flar
10-20-2000, 03:21 AM
im running apache 1.3.12 too but on a slackware 7.1 i have 5 virtual hosts and all are functioning normal. here u can see my httpd.conf

NameVirtualHost my.ip.here.xx

<VirtualHost my.ip.here.xx>
ServerAdmin admin@my.host
DocumentRoot /usr/local/apache/htdocs
ServerName www.domain1.com (http://www.domain1.com)
ErrorLog logs/domain1-error.log
CustomLog logs/domain1-access.log common
</VirtualHost>

<VirtualHost my.ip.here.xx>
ServerAdmin admin@my.host
DocumentRoot /usr/local/apache/htdocs/domain2
ServerName www.domain2.com (http://www.domain2.com)
ErrorLog logs/domain2-error.log
CustomLog logs/domain2-access.log common
</VirtualHost>

all are working fine..

hope this helps..
and if u have any other infos bout the problem, then post it.. am sure many of here can help u.




[This message has been edited by flar (edited 20 October 2000).]