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