Skip to content

Instantly share code, notes, and snippets.

@nahidacm
Created August 8, 2012 03:22
Show Gist options
  • Save nahidacm/3291744 to your computer and use it in GitHub Desktop.
Save nahidacm/3291744 to your computer and use it in GitHub Desktop.
Sample virtual host settings for localhost
#
#Added by NHD
#
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "D:\wamp\www"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\wamp\www\doctor-data\public"
ServerName doctor-data.local
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "D:\wamp\www\doctor-data\public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName client1.localhost
DocumentRoot "D:\wamp\www\client1"
<Directory "D:\wamp\www\client1">
allow from all
order allow,deny
AllowOverride All
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
<VirtualHost *:80>
ServerName zf_cms.localhost
DocumentRoot "D:\wamp\www\zf_cms\public"
<Directory "D:\wamp\www\zf_cms\public">
allow from all
order allow,deny
AllowOverride All
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
@nahidacm
Copy link
Author

nahidacm commented Aug 8, 2012

Don't forget to set the ServerName to the end of your host file.
For windows, it is usually located in C:\Windows\System32\drivers\etc\hosts

EX:
127.0.0.1 doctor-data.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment