Debugging records for APMServ5.2.6 and IIS sharing port 80

Source: Internet
Author: User
Tags perl script

The company's servers have been using the PHP environment to build the Zhuzhou Metropolis online bbs.zzccoo.com Forum as a local portal website. Today, we have received requirements from the Department and need to add another formal portal website, the Forum serves as a subsidiary website for communication with netizens. This time, the server was changed a lot. The most important thing was that the previous server only had the Apache environment, currently, the portal website developed by the company uses SQL2005 +. in the NET2.0 environment, but I don't want to add another server, I just have to stick my head to a server to implement Apache + IIS sharing port 80.

Other SQL2005 installations are all well said. The key is that two websites with different source codes in different environments need to share port 80. Many of the materials found on Baidu are Mo Ling Xiao, so there is no specific explanation, because Baidu searched for tutorials in an Apache independent environment, rather than the APMServ5.2.6 integrated environment on my current server, there was a huge difference. After studying for about four hours, I finally solved this problem. Now I have published my solution, hoping that more people will be able to cope with applications in other special environments.

Let's talk about the server configuration environment before I configure it. APMServ5.2.6 integrates the PHP environment:

Apache 2.2.9 [HTTP server]
Nginx 0.7.19 [HTTP server]
NetBox 2.8 Build 4128 [HTTP server + ASP script interpretation engine]
PHP 5.2.6 [PHP script engine]
MiniPerl 5.8 [Perl script interpreter]
Memcached 1.2.4 [key-value memory cache system]
MySQL 5.1.28 [MySQL database server]
MySQL 4.0.26 [MySQL database server]
PhpMyAdmin 2.11.9.2 [MySQL database online management tool]
EAccelerator 0.9.5.3 [PHP script Acceleration Engine]
ZendOptimizer 3.3.3 [PHP script Acceleration Engine]
OpenSSL 0.9.8h [HTTPS (SSL) Secure Transmission Protocol]

 

Step 1: Install the SQL2005 database and IIS6.0 (built-in windows2003), and change the IIS port to port 81 (Apache environment and port 80 occupied );

Step 2: configure the Apache environment so that Apache can access port 81 as a proxy;

(1) modify the httpd. conf file in the "D: \ APMServ5.2.6 \ Apache \ conf" directory:

Find the following lines of text and remove the above # To enable the proxy function.

 
  1. LoadModule proxy_module modules/mod_proxy.so 
  2. LoadModule proxy_connect_module modules/mod_proxy_connect.so 
  3. LoadModule proxy_http_module modules/mod_proxy_http.so 
  4. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so 

Note: In addition, check whether the httpd. conf file contains the httpd-vhosts.conf file, if there is # In Front Of The following text, remove it

 
  1. # Virtual hosts 
  2. Include conf/extra/httpd-vhosts.conf 

 

(2) then add the VM information under Apache and IIS In the httpd-vhosts.conf file under the directory "D: \ APMServ5.2.6 \ apache \ conf \ extra:

Example of virtual host configuration under IIS:

 
  1. <VirtualHost *:80> 
  2.     ProxyPreserveHost On 
  3.     ServerAdmin 7740606@qq.com   
  4.     ServerName www.zzccoo.com 
  5.     ServerAlias zzccoo.com  *.zzccoo.com 
  6.     DefaultLanguage zh-CN 
  7.     AddDefaultCharset GB2312 
  8.     ProxyPass / http://www.zzccoo.com:81/ 
  9.     ProxyPassReverse / http://www.zzccoo.com:81/ 
  10. </VirtualHost> 

Example of virtual host configuration in apache:

 
  1. <VirtualHost *:80> 
  2.     ServerAdmin 1047894@qq.com 
  3.     ServerName www.zhuzho.com 
  4.     ServerAlias zhuzho.com *.zhuzho.com 
  5.     DocumentRoot “d:/zhuzho” 
  6. </VirtualHost> 

Remember that a website with the same domain name as port 81 must be established under IIS for forwarding. Of course, after the preceding configuration changes are saved, you must restart IIS and Apache to make the changes take effect.

You can see my website instance: www.2cto.com

Bbs.zzccoo.com/is the Zhuzhou urban online forum and port 80 built on the PHP environment.

Www.zzccoo.com/and www.zzccoo.com:81are built on the iisenvironment's 81port. The two addresses are on the same page.

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.