- VPS Hosting
- Web Hosting
- Dedicated Servers
- Reseller Hosting
- Web Services
- About AccuWeb
How to set up Virtual Host in WAMP?
You must have WAMP installed on your system and running on port 80.
To set up a virtual host and a local domain, follow the steps mentioned below:
1) In folder C:/wamp/www on computer1, we now create 3 folders associated with domain and 2 subdomains as follows:
2) In each folder, we create folder logs to store the log files, and make sure to have these logs folders in place or your wamp will not run:
3) open file httpd.conf in folder C:\wamp\bin\apache\apache2.2.6\conf and find these lines:
# Virtual hosts
4) uncomment the second line, and make sure there is no blank space in front of second line and in the end of first line or your wamp will not run:
# Virtual hosts
5) open file httpd-vhosts.conf in folder C:\wamp\bin\apache\apache2.2.6\conf\extra, delete everything in there and replace with these codes below. Make sure to put your main site on very first and localhost in very last.
ServerAlias domain.com domain
CustomLog C:/wamp/www/domain/logs/access.log common
CustomLog C:/wamp/www/sub1/logs/access.log common
CustomLog C:/wamp/www/sub2/logs/access.log common
CustomLog C:/wamp/www/logs/access.log common
6) open file "hosts" in folder C:/Windows/System32/drivers/etc on computer1; then, delete and replace those dummy codes with these codes:
7) Now, you can access the domain on your local system as
There are currently 1 users browsing this thread. (0 members and 1 guests)