Windows builds a WAMP environment that is much simpler than a Linux system, but many of the online experiences are misunderstood, resulting in a lot of time to configure.
1. Download Wampserver http://xiazai.xiazaiba.com/Soft/W/wamp_2.5_XiaZaiBa.zip?pcid=27954&filename=wamp_2.5_ Xiazaiba.zip&downloadtype=xiazaiba_seo
After installation, the WAMP program appears green to indicate that the service is turned on, if it is not necessary to reinstall to ensure normal.
Access to localhost and localhost/phpmyadmin to ensure normal access
2, the configuration of the virtual host
A) D:\wamp\bin\apache\Apache2.2.21\conf find httpd.conf
Add 801 port after port 80
Join Listen 801
#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [:: 0]:80
Listen 0.0.0.0:801
Listen [:: 0]:801
b) Remove the previous #, turn on rewrite
#开启重写
LoadModule Rewrite_module modules/mod_rewrite.so
3. Locate the configuration of the D:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf file and add 801 ports after the virtual host port 80
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/wamp/www"
ServerName localhost
Serveralias localhost
Errorlog "Logs/localhost-error.log"
Customlog "Logs/localhost-access.log" common
</VirtualHost>
#开启项目的虚拟主机配置
<virtualhost *:801>
ServerAdmin [email protected]
DocumentRoot "d:/wamp/www/myproject"
ServerName localhost
Serveralias localhost
Errorlog "Logs/localhost-error.log"
Customlog "Logs/localhost-access.log" common
</VirtualHost>
4, the above all set up, click Wamp Right button restart all Services , enter the domain name localhost:801 can access the site.
Congratulations on the successful installation!
WINDOWS10 WAMP Environment Virtual host port configuration