This article introduces how to enable both iis and apache to use port 80 on the server. If you need it, refer to this article.
Method 1:
IIS5, coexistence under multiple IP addresses, IIS is 192.168.0.1, apache is 192.168.0.2 original address
C: InetpubAdminscripts
Cscript adsutil. vbs set w3svc/disablesocketpooling true
The command returns the following disablesocketpooling: (BOOLEAN) True
Restart IIS
InetpubAdminScripts> cscript adsutil. vbs set w3svc/disablesocketpooling true
Because DisableSocketPooling is defined as a valid attribute in the IIS 6.0 metabase architecture (MBSchema. xml), you can still set this attribute using Adsutil. vbs, but this setting does not work. 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 2: 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"
The most important one is PHPIniDir, which is used to specify php. INI file location, that is, the installation directory of PHP5. Note that all directories should be changed to the format D:/PHPServer/PHP5 instead of D: PHPServerPHP5. the IIS access address is http: // 192.168.0.1, Apache access address: http: // 192.168.0.2
Method 3: forward all requests to IIS through the Apache Virtual Host
Maybe you think the above method is thorough enough, not the 100% IIS environment, or you do not like to share the Apache root directory with IIS, you can try this method.
1. Stop Apache first;
2. Edit the Apache configuration file: apacheconfHttpd. confLocate the following two items and annotate the previous symbol#Remove and load the Proxy Module
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
3. Edit againAdd the following content to the end of the httpd. conf file:
ServerName xwjie.iis
ProxyPass / http://127.0.0.1:84/
ProxyPassReverse / http://127.0.0.1:84/
Here, we will also explain that the first line is the name of the host you want to bind. If you want to perform a local test, you can enter the host file at will and change the host file through step 1 below. In the actual product environment, you can directly write a domain name such as ServerName www.xwjie.com and then modify the DNS of www.xwjie.com to point to the IP address of the local machine.
4. Start Apache
5. Create a site in IIS and bind port 84 to the root directory of the website.
6. Because the Host name xwjie. iis bound here does not exist, we need to change the Host name to 127.0.0.1. Open the "host" file in the C: WindowsSystem32driversetc directory and add a line:
127.0.0.1 xwjie.iis
7. Now you can open your browser and visit http://xwjie.iis /.
The above two methods are introduced to make Apache and IIS coexist at port 80. If you still have a better method