Wamp _ multi-site configuration _ HTTP. conf

Source: Internet
Author: User

Wamp is widely used. Its silly installation and configuration allow us to easily complete the previously cumbersome server environment setup process and directly access the Web application deployment, it is also very easy to maintain in the future.

However, Wamp only provides single-site erection by default, which is one of its shortcomings. However, this disadvantage can be overcome through some simple operations. There are many related articles on the Internet, but many of them are not suitable and the steps are cumbersome. After many failures and software reinstallation experiences, the following briefly summarizes the configuration process of Wamp for multiple sites.

The first necessary materials are: Wamp, mouse, keyboard, display ...... (Well, it's a joke. Let's get started .)

This section mainly introduces the configuration in Wamp 2.3. Currently, it seems to be the latest version. The configuration of other versions should be slightly different.

First, open httpd in the installation directory Wamp/bin/Apache/apache2.3.14/CONF/In the text editor. CONF file. For example, if the site directory is under D:/Wamp/www/, it is generally like the following:

DocumentRoot "D:/Wamp/www /"
<Directory "D:/Wamp/www/">
Options indexes followsymlinks execcgi
Order allow, deny
Allow from all
AllowOverride all
</Directory>

Add another site parameter above or below. For example, the root directory of the site is in the D:/Wamp/test/folder, as shown below:

DocumentRoot "D:/Wamp/test /"
<Directory "D:/Wamp/test/">
Options indexes followsymlinks execcgi
Order allow, deny
Allow from all
AllowOverride all
</Directory>

Add the following code at the bottom of the httpd. conf file (servername can be set by yourself ):

<Virtualhost *: 80>
DocumentRoot "D:/Wamp/www /"
Servername website
</Virtualhost>
<Virtualhost *: 80>
DocumentRoot "D:/Wamp/test /"
Servername Test
</Virtualhost>

Finally, you need to modify the host file, usually in the C:/Windows/system32/Drivers/etc directory, and add it at the bottom of the file (the website and test are the servername specified above ):

127.0.0.1 website
127.0.0.1 Test

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.