"Go" wamp Multi-site configuration

Source: Internet
Author: User

Wamp is being widely used, its fool-style installation configuration, so that we can easily complete the past more cumbersome server environment to build the process, directly into the deployment of Web programs, and maintenance is very simple in the future.

However, Wamp is one of its drawbacks by providing a single-site setup by default. However, through some simple operation can overcome this shortcoming, there are many related articles on the Internet, but found that many are not applicable, and the steps are cumbersome. After many failures and the experience of reloading the software, the following is a brief summary of the WAMP implementation of the multi-site configuration process .

First of all the necessary materials are: Wamp One, mouse one, keyboard one, monitor ... (Oh, this is purely a joke, or go to the point of it.) )

The main introduction of the configuration in Wamp 2.3, the current looks like the latest version, other versions of the configuration should not be very different.

First use a text editor to open the file under the installation directory wamp/bin/apache/apache2.3.14/conf/ httpd.conf , such as the site directory under d:/wamp/www/, the general is the following look:

DocumentRoot "d:/wamp/www/"<Directory "d:/wamp/www/">    Options Indexes FollowSymLinks ExecCGI    Order allow,deny    Allow from all    AllowOverride All</Directory>

Then add another site's parameters above or below, such as the site's root directory under the d:/wamp/test/folder, as follows:

DocumentRoot "d:/wamp/test/"<Directory "d:/wamp/test/">    Options Indexes FollowSymLinks ExecCGI    Order allow,deny    Allow from all    AllowOverride All</Directory>

Then add the following code at the bottom of the httpd.conf file (ServerName can set it 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, at the bottom of the file (where the website and test are the servername specified above):

127.0.0.1 website127.0.0.1 test

"Go" wamp Multi-site configuration

Related Article

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.