After a burst of stability considerations, the company's Web site decided to use IIS as a management platform, Apache to do access to the platform, but the server to open up the number of ports are too few, how to make Apache and IIS sharing a port, and both? Google, find the following ways to start practicing ....
To debug the program, the native installs IIS and Apache, cannot use 80 ports at the same time, now gives the workaround:
Method One: Original address
IIS5, multi-IP coexistence, IIS for 192.168.0.1,apache for 192.168.0.2
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: Original address
IIS6, multi-IP coexistence, IIS for 192.168.0.1,apache for 192.168.0.2 to 2003 under the CD Support/tools/support.cab. 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 Http://192.168.0.1,Apache access address is http://192.168.0.2
Method Three:
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.
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.
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
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.