Old 22-11-2007, 13:33   #1 (permalink)
crewebiker
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.
  Reply With Quote
Old 23-11-2007, 07:45   #2 (permalink)
crewebiker
Junior Cyclist
 
Join Date: Nov 2007
Posts: 36
Never mind, messed around a bit more and got it working.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8