virtual host problem
I have two websites on one machine. I'm running apache 2 on mandrake 9.0
I'm having a problem with my virtual hosts file, when I change the document root to where the site lives, it changes both sites to the virtual host home page, when I change it back it changes both home pages back to the other home page. Help! Michele |
I'm not sure if I follow. :scratch:
You are changing the DocumentRoot of a <VirtualHost>. Do your two VirtualHost directives look something like this: Code:
<VirtualHost 10.0.0.1:80> |
hi,
are you using a name-based virtual host or an ip-based host? basically, name-based means hosting multiple websites from one ip address here is an example extract from the apache documentation page : NameVirtualHost * <VirtualHost *> ServerName www.domain.tld ServerAlias domain.tld *.domain.tld DocumentRoot /www/domain </VirtualHost> <VirtualHost *> ServerName www.otherdomain.tld DocumentRoot /www/otherdomain </VirtualHost> try coping the above into your configuration file, and altering it to your needs if all else fails, this: http://httpd.apache.org/docs-2.0/vhosts/ will be quite useful |
didn't work
Hi Mathieu:
I copied the code you supplied and filled in the appropriate info for my server and it switched so that now both hosts on the machine answer the virtual host home page. I'm clueless. Michele |
Can you post your virtual host file ?
Do you want these two web sites to be accessable from the internet? |
Thanks for help with Vhost.conf
Thanks for the link to the man pages for apache, it was helpful and I got both my website up and running.
I had to put an entry in for every website on the ip, even the default. Thanks, Michele |
All times are GMT -5. The time now is 10:35 AM. |