Find us on facebook

Jul 1, 2015

Setup virtual host in any location

Step 1: Go to "C:/Windows/System32/drivers/etc" and open the "hosts" file in Notepad.

Step 2: At the bottom of the hosts file, below all the other text, add a new line with the following:
127.0.0.1   mysite.local    #My Test Site

Step 3: Open "httpd.conf" in "C:/wamp/bin/apache/Apache2.2.21/conf/"

Step 4: under "# Virtual hosts", uncomment (remove the hashtag [#]) before the line "Include conf/extra/httpd-vhosts.conf"

Step 5 : Go to "C:/wamp/bin/apache/Apache2.2.21/conf/extra" and open the file "httpd.vhosts.conf".
<Directory D:/Projects>
Require all granted
</Directory>
 <VirtualHost *:80>  
DocumentRoot "D:\Projects\skwirk"
ServerName skwirk.ml

</VirtualHost>

No comments:

Post a Comment