Apache and IIS share 80-Port Four Settings method _ website Application

Source: Internet
Author: User

method One:
IIS5, multi-IP coexistence, IIS 192.168.0.1,apache to 192.168.0.2
c:\Inetpub\Adminscripts
cscript adsutil.vbs set w3svc/disablesocketpooling true
This command feeds back to the following disablesocketpooling: (BOOLEAN) True
Restart IIS
Inetpub\adminscripts>cscript adsutil.vbs set w3svc/disablesocketpooling true
because disablesocketpooling in IIS 6.0 The metabase schema (MBSchema.xml) is defined as a valid property, so you can still set the property using Adsutil.vbs, but this setting does not work. The features in IIS 6.0 are part of the new core-level driver HTTP.sys. To configure HTTP.sys, you must use Httpcfg.exe

method Two:
IIS6, multi-IP coexistence, IIS 192.168.0.1,apache to 192.168.0.2
to 2003 CD support/tools/ Support.cab. Extract the Httpcfg.exe file, copy to the windows/system32/directory, use your own look help
command line
Bind to a ip:httpcfg set iplisten-i 192.168.0.1
That is, the command uses only the specified IP and port for IIS to
View bindings: Httpcfg query Iplisten
Delete bindings: httpcfg Delete iplisten-i 192.168.0.1
Command line
net stop Apache2
net stop iisadmin/y
net start Apache2
net start w3svc
guarantees that IP settings under IIS are global defaults, and httpconf settings in Apache listen 192.168.0.2:80, you should be able to run both services at the same time, do not conflict with each other.
The access address for IIS is Http://192.168.0.1,Apache access address is http://192.168.0.2
reminder: IIS is to be specified as an IP address 192.168.0.1 port 80;apache Set Listen 192.168.0.2:80. The key is that IIS is bound with the HTTPCFG command to reboot the system, and simply restarting the service is not going to work.

Method Three:
Set Apache to use port 80, IIS uses other ports, such as 81, and then Apache as the agent for IIS.
In httpd.conf, uncomment the following four lines:
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

A virtual host is then established to turn all access to the domain name to port 81.

ServerName iloves.vicp.net
proxypass/http://localhost:81/
proxypassreverse/http://localhost:81/

In this way, you can use both Apache and IIS functionality with only one port externally.

method Four:
Online Common single IP common 80-port method, but not recommended, just use Apache proxy, speed has an impact on the Apache set to use 80 ports, IIS use other ports, such as 81, and then Apache as the agent of IIS.
In httpd.conf, uncomment the following four lines:
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
A virtual host is then established to turn all access to the domain name to port 81.
ServerName iloves.vicp.net
proxypass/http://localhost:81/
proxypassreverse/http://localhost:81/
In this way, you can use both Apache and IIS functionality with only one port externally.
By analogy, using the second method, you can configure PHP5 on IIS, just install PHP4 in IIS, and copy php.ini to the \ Windows directory, which goes without saying, Apache2, Php4,apache2. Just put the PHP5 php.ini in the PHP5 installation directory.
Configure Apache to support PHP5:
LoadModule php5_module "D:/phpserver/php5/php5apache2.dll"
AddType application/x-httpd-php. php
DirectoryIndex index.html index.php
Phpinidir "D:/phpserver/php5″
One of the most important is Phpinidir, which indicates the location of the php.ini file, the PHP5 installation directory, and note that all catalogs should be D:/PHPSERVER/PHP5 This format, not D:\PHPServer\PHP5, The access address for IIS is Http://192.168.0.1,Apache access address is http://192.168.0.2

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.