WINDOWS10 WAMP Environment Virtual host port configuration

Source: Internet
Author: User

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

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.