Tutorial on sharing port 80 _ PHP between IIS and Apache

Source: Internet
Author: User
Tags apache php
IIS and Apache share port 80. The. net program of IIS is bound to port 81, and the host name is www. a. comapache's php program is bound to port 80. the host name is www. B .com. then, if the apache server has been installed successfully, open httpd. co

The. net program in IIS is bound to port 81 with the host name www.a.com.

The apache php program is bound to port 80 with the host name www. B .com.

Then, assuming that the apache server has been installed successfully, open the httpd. conf configuration file and find the following places to remove # enable the proxy module:

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

Make sure that the comment is also canceled here:

Include conf/extra/httpd-vhost.conf

Open the httpd-vhosts.conf file in the apache/conf/extra directory and add the following content at the end:

NameVirtualHost *: 80
 
  
ServerName www. B .com DocumentRoot "D:/web/php Site Directory"
 
 
  
ServerName www.a.com ProxyPass/http://www.a.com: 81/ProxyPassReverse/http://www.a.com: 81/
 

At last, restart both servers and enable both www.a.com and www. B .com to access the server normally.

--- Restore content end ---

Bind apache's php program to port 80 with the host name www. B .com. then, if the apache server has been installed successfully, open httpd. co...

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.