Here are the steps to setup additional domains on a wampserver, if you are using it for production use.
1- Click on wampserver icon in the system tray and select Apache -> httpd.conf
2- Goto the very bottom of the file and enable the following settings for virtaul hosts
- Code: Select all
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
3- Then goto the wamp\bin\apache\Apachex.x.x\conf\extra and open the file httpd-vhosts.conf with notepad or any text editor application.
4- There will be sample extries like
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost"
ServerName dummy-host.localhost
ServerAlias www.dummy-host.localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
</VirtualHost>
You can edit the sample entries to add your real domain, the sample entry may look like
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@geosourcecode.com
DocumentRoot "c:/wamp/www/geosourcecode.com"
ServerName geosourcecode.com
ErrorLog "logs/geosourcecode-error.log"
CustomLog "logs/geosourcecode-access.log"
</VirtualHost>
Simple .... it works perfectly for me