/ Published in: Apache

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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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>
Comments
