Because only one server (win2003 server) needs to run ASP programs and PHP applications on the server, and does not want to use IIS to run PHP applications.
In addition, if you do not want to run ASP programs on Apache, you need a solution for coexistence of Apache and IIS.
IIS is the built-in iis6.0 of Windows2003 server.
Apache is apache2.2.8.
First, download and install Apache
Then, stop the automatically started IIS server and modify the IIS port to a non-80 (such as 8081)
Then open the httpd. conf file of Apache to start configuration.
To enable Apache to support forwarding, that is, to act as an IIS proxy, you must first enable the Apache proxy module:
# Loadmodule proxy_module modules/mod_proxy.so
--> Loadmodule proxy_module modules/mod_proxy.so
# Loadmodule proxy_connect_module modules/mod_proxy_connect.so
--> Loadmodule proxy_connect_module modules/mod_proxy_connect.so
# Loadmodule proxy_ftp_module modules/mod_proxy_ftp.so
--> Loadmodule proxy_ftp_module modules/mod_proxy_ftp.so
# Loadmodule proxy_http_module modules/mod_proxy_http.so
--> Loadmodule proxy_http_module modules/mod_proxy_http.so
After enabling the proxy module, we start to configure the virtual host.
First include httpd-vhosts.conf files
# Include CONF/extra/httpd-vhosts.conf
--> Include CONF/extra/httpd-vhosts.conf
Save httpd. conf and open the httpd-vhosts.conf File
Start configuring virtual machine
Namevirtualhost *: 80
<Virtualhost *: 80>
Serveradmin B @ B .com
Servername www. B .com
DocumentRoot "C:/program files/Apache Software
Foundation/apache2.2/htdocs"
</Virtualhost>
<Virtualhost *: 80>
Proxypreservehost on
Serveradmin a@a.com
Servername www.a.com
Defaultlanguage ZH-CN
Adddefacharcharset gb2312
Proxypass/http://www.a.com: 8081/
Proxypassreverse/http://www.a.com: 8081/
</Virtualhost>
Configuration complete and save httpd-vhosts.conf
Restart the Apache server and IIS server.
We use www.a.com
The default page of IIS is displayed when you visit the past.
Through www. B .com
You can see it's work in the past.
In this way, IIS and Apache share port 80.