Previously wrote an article about configuring a virtual host in a Linux environment;
Now there is another scene; write multiple projects locally at the same time; The local WAMP environment has only one www directory, so it is painful to modify the directory frequently;
So happiness is so unprepared to come, the following describes how to configure the local Wamp multi-directory;
Sample environment:
Wampserver Version: 2.2
Wamp Directory: e:/tongbu/wamp/
Local domain name: localhost
test.com
Local directory: e:/tongbu/wamp/www/
e:/tongbu/wamp/test/
1: Modify e:/tongbu/wamp/bin/apache/apache2.2.21/conf/httpd.conf file
Find include conf/extra/httpd-vhosts.conf Delete Comment # number approximately 474 lines
650) this.width=650; "alt=" httpd.conf.jpg "src=" http://www.baijunyao.com/Upload/image/ueditor/20150423/ 1429718414186244.jpg "title=" 1429718414186244.jpg "/>
Then add the following:
<directory "e:/tongbu/wamp/test/" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
650) this.width=650; "alt=" 1.jpg "src=" http://www.baijunyao.com/Upload/image/ueditor/20150423/1429804526627419. JPG "title=" 1429804526627419.jpg "/>
2: Modify e:/tongbu/wamp/bin/apache/apache2.2.21/conf/extra/httpd-vhosts.conf file
Modify the content between <virtualhost *:80></virtualhost> as follows:
<virtualhost *:80>
ServerName localhost
Serveralias localhost
DocumentRoot e:/tongbu/wamp/www/
</VirtualHost>
<virtualhost *:80>
ServerName test.com
Serveralias www.test.com
DocumentRoot e:/tongbu/wamp/test/
</VirtualHost>
650) this.width=650; "alt=" 2.jpg "src=" http://www.baijunyao.com/Upload/image/ueditor/20150423/1429804555179997. JPG "title=" 1429804555179997.jpg "/>
3: Modify the c:windows/system32/drivers/etc/hosts file
Add content as follows:
127.0.0.1 localhost
127.0.0.1 test.com
650) this.width=650; "alt=" hosts.jpg "src=" http://www.baijunyao.com/Upload/image/ueditor/20150423/ 1429718834232889.jpg "title=" 1429718834232889.jpg "/>
Create the test folder under Wamp directory e:/tongbu/wamp/ , and access localhost and test.com locally
The Green Font section changes to its local directory according to the situation;
If you need to configure multiple virtual hosts in the Linux environment to mount Multi-site simultaneous operation can be referenced: The Linux environment Apache configuration multiple Virtual host Mount multi-site simultaneous operation
This article for Bai Jun Remote original article, reprinted without contact with me, but please specify from Bai Jun remote blog baijunyao.com
This article is from the "Bai Jun Remote Blog" blog, please be sure to keep this source http://shuaibai123.blog.51cto.com/10163353/1639512
Set up a local wamp environment to mount multiple sites concurrently running