| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Junior Cyclist
Join Date: Nov 2007
Posts: 36
|
configuring vhosts in apache
I'm currently in the middle of migrating from IIS to Apache on my webserver, which i'm finding to be a right ballache. What i'm having trouble with is configuring the virtual hosts in the config file. This is what i've got so far: NameVirtualHost 213.78.10.222:80 <VirtualHost *> DocumentRoot C:/hosting/mainsite </VirtualHost> <VirtualHost *> ServerName hosting.mainsite.co.uk DocumentRoot C:/hosting/clients ServerAlias hosting </VirtualHost> <VirtualHost *> ServerName www.siteno2.co.uk DocumentRoot C:/hosting/clients/site2 ServerAlias *.site2.co.uk </VirtualHost> <VirtualHost *> ServerName www.siteno3.co.uk DocumentRoot C:/hosting/clients/site3 </VirtualHost> Obviously the domains are proper domains and not 'mainsite' or 'siteno2' and i've got the dns setup correctly as it worked fine on IIS. Whats happening is, whenever I go to a domain that should be configured for a virtual host in a browser, it comes up with the main site rather than the site in the document root of the virtual host. Is there anything else in the config file I need to change or any errors that you guys can see there? Help would be greatly appreciated. |
|
|
|
![]() |