Apache four ways to share 80 ports with IIS

Source: Internet
Author: User
Tags command line

To debug the program, the native installs IIS and Apache, cannot use 80 ports at the same time, now gives the workaround:

Method One:

IIS5, multi-IP coexistence, IIS for 192.168.0.1,apache for 192.168.0.2 original address

C:\Inetpub\Adminscripts

cscript adsutil.vbs set w3svc/disablesocketpooling true

The command feedback follows DisableSocketPooling: (BOOLEAN) True

Restart IIS

Inetpub\adminscripts>cscript adsutil.vbs set w3svc/disablesocketpooling true

Because disablesocketpooling is defined as a valid property in the IIS 6.0 metabase schema (MBSchema.xml), you can still use Adsutil.vbs to set this property, 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 the Httpcfg.exe

Method Two:

IIS6, multi-IP coexistence, IIS for 192.168.0.1,apache for 192.168.0.2 original address

To the Support/tools/support.cab under the 2003 CD. Extract httpcfg.exe files, copy to windows/system32/directory, use yourself to see Help

Command line

Bound to a ip:httpcfg set iplisten-i 192.168.0.1

That is, the command uses IIS to listen only for the specified IP and port

Viewing bindings: Httpcfg query Iplisten

Delete binding: httpcfg Delete iplisten-i 192.168.0.1

Command line

net stop Apache2

net stop iisadmin/y

NET START Apache2

NET START w3svc

To ensure that the IP settings under IIS are global defaults, Apache httpconf set Listen 192.168.0.2:80, you should be able to run both services at the same time, not conflicting.

The access address for IIS is [URL] http://192.168.0.1[/url],apache access address is [Url]http://192.168.0.2[/url]

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.

<virtualhost *:80>

ServerName iloves.vicp.net

Proxypass/[Url]http://localhost:81/[/url]

Proxypassreverse/[url]http://localhost:81/[/url]

</VirtualHost>

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

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.