Set up a local wamp environment to mount multiple sites concurrently running

Source: Internet
Author: User

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 the 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

Then add the following:

<directory "e:/tongbu/wamp/test/" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>


2: Modify the 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>


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


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.