Skip to content

Instantly share code, notes, and snippets.

@dejanmarkovic
Created November 13, 2013 19:31
Show Gist options
  • Save dejanmarkovic/7454930 to your computer and use it in GitHub Desktop.
Save dejanmarkovic/7454930 to your computer and use it in GitHub Desktop.
Adding virtual hosts to apache
1. Launch Notepad++ and open the hosts file located at C:\windows\system32\drivers\etc\hosts.
127.0.0.1 name_of_your_site
2.In Notepad++ open the Apache configuration file located at C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "C:\Documents and Settings\Me\My Documents\clientA\website"
ServerName name_of_your_site
<Directory "C:\Documents and Settings\Me\My Documents\clientA\website">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment