Return to Snippet

Revision: 35409
at November 8, 2010 10:15 by Meander365


Updated Code
Step 1
======

In the file: C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf
Find: NameVirtualHost *:80     Replace with: NameVirtualHost *

In the file: C:\wamp\bin\apache\Apache2.2.11\conf\httpd . conf
Find: #Include conf/extra/httpd-vhosts.conf     and delete the #

Step 2
======
Location: C:\Windows\System32\drivers\etc\hosts

For Each Website you will need to insert the following: 127.0.0.1 www.domain.dev

127.0.0.1 represents the IP for your localhost.


Step 3
======
Location: C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf

For Each Website add the following:

<VirtualHost *>
	ServerName www.domain.dev
	DocumentRoot "C:/wamp/www/domain.com/"
</VirtualHost>

Remove those 2 dummy virtual hosts and add:

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot C:/wamp/www/
</VirtualHost>

Also add this if you want others on the network to access your local machine:

<VirtualHost *:80>
	ServerName 192.168.1.??
	DocumentRoot C:/wamp/www/
</VirtualHost>

Revision: 35408
at November 7, 2010 16:29 by Meander365


Initial Code
Step 1
======

In the file: C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf
Find: NameVirtualHost *:80     Replace with: NameVirtualHost *

In the file: C:\wamp\bin\apache\Apache2.2.11\conf\httpd . conf
Find: #Include conf/extra/httpd-vhosts.conf     and delete the #

Step 2
======
Location: C:\Windows\System32\drivers\etc\hosts

For Each Website you will need to insert the following: 127.0.0.1 www.domain.dev

127.0.0.1 represents the IP for your localhost.


Step 3
======
Location: C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf

For Each Website add the following:

<VirtualHost *>
	ServerName www.domain.dev
	DocumentRoot "C:/wamp/www/domain.com/"
</VirtualHost>

Remove those 2 dummy virtual hosts and add:

<VirtualHost *:80>
	DocumentRoot C:/wamp/www
	ServerName localhost
</VirtualHost>

Initial URL
http://www.kintek.com.au/web-design-blog/configuring-multiple-domains-within-wamp-for-local-development/

Initial Description
Great for developing multiple sites under a wamp install.  Removes the headache of paths and domains and changing them when deploying to their live environment.

Initial Title
Configuring Multiple Domains within WAMP for Local Development

Initial Tags
apache, Development

Initial Language
Apache