Reputation: 251
I have 3 Wamp servers for my 3 different websites.How can i fix the problem if i turn on my first Wamp server
(c:/folder1/wamp)
instead the third wamp server is run
(c:/folder1/folder2/wamp)
how can i fix this?
i tried to uninstall the third one but sadly all my Wamp server did not work
Upvotes: 0
Views: 124
Reputation: 1563
The best way to run multiple local sites with the root url instead of full path is this:
hosts
First, you need to edit your hosts file on the server. This will map the virtual host name to an IP address. To keep this simple, we'll map 127.0.0.1 to mysite. Here's how:
vhosts
Then, in your httpd-vhosts.conf file:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:\MYSITE1"
ServerName mysite1.dev
ErrorLog "logs/mysite1.log"
CustomLog "logs/mysite1-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:\MYSITE2"
ServerName mysite2.dev
ErrorLog "logs/mysite2.log"
CustomLog "logs/mysite2-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:\MYSITE3"
ServerName mysite3.dev
ErrorLog "logs/mysite3.log"
CustomLog "logs/mysite3-access.log" common
</VirtualHost>
Here is a link with very clear instructions - Link to Create Virtual Hosts
Upvotes: 1