This is a discussion on Virtual Hosts within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I'm trying to figure out how to point a request like this: http://foo.com to point at ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I'm trying to figure out how to point a request like this: http://foo.com to point at the document root for the virtually hosted site. Right now this request goes back to my original DocumentRoot. How can I get this request to go to the DocumentRoot listed in the virtual host? Here is my virtual host for the site <VirtualHost 192.168.1.106> ServerAdmin foo@foo.com DocumentRoot /var/www/foo ServerName www.foo.com ErrorLog /var/log/httpd/error_log </VirtualHost> I tried adding another virtual host ( ServerName *foo.com) to pick up the missing "www" but it didn't work. Do I need an alias or another virtual host maybe? I don't plan on using subdomains for the site. Thanks Dan |
|
|||
|
On Wed, 08 Feb 2006 11:02:59 -0800, dcoleyoung wrote:
> Hi, > > I'm trying to figure out how to point a request like this: > > http://foo.com > > to point at the document root for the virtually hosted site. Right now > this request goes back to my original DocumentRoot. How can I get this > request to go to the DocumentRoot listed in the virtual host? > > Here is my virtual host for the site > > <VirtualHost 192.168.1.106> > ServerAdmin foo@foo.com > DocumentRoot /var/www/foo > ServerName www.foo.com ServerAlias foo.com > ErrorLog /var/log/httpd/error_log > </VirtualHost> > > I tried adding another virtual host ( ServerName *foo.com) to pick up > the missing "www" but it didn't work. Do I need an alias or another > virtual host maybe? I don't plan on using subdomains for the site. > > Thanks > > Dan .... and make sure that foo.com resolves to 192.168.1.106 on the local server. |