Forum Moderators: phranque

Message Too Old, No Replies

VirtualHost directive

         

anshul

8:40 am on May 14, 2005 (gmt 0)

10+ Year Member



I'm using Apache2 on Windows. I need to use VirtualHost directive.
I want to set www.yahoo.com and www.google.com on my localhost/127.0.0.1
But this is not working, please help.
This is my httpd.conf:

ServerName 127.0.0.1
UseCanonicalName On
DocumentRoot "/"
HostnameLookups On

Listen 1024
NameVirtualHost 127.0.0.1:1024
<VirtualHost 127.0.0.1:1024>
ServerName www.yahoo.com
DocumentRoot /Inetpub/wwwroot/yahoo
</VirtualHost>

Listen 1025
NameVirtualHost 127.0.0.1:1025
<VirtualHost 127.0.0.1:1025>
ServerName www.google.com
DocumentRoot /Inetpub/wwwroot/google
</VirtualHost>

encyclo

5:30 pm on May 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DocumentRoot /Inetpub/wwwroot/yahoo

Surely if you're on Windows, the document root path would look more like this:

C:\Inetpub\wwwroot\yahoo

Your example as given above looks more like a Linux file system path.