WINDOWS 2008 R2 已經安裝了APACHE在運行,佔用80端口,現有一個ASP系統需上線,新安裝 IIS 7.5後,配置好相關參數,端口爲81,分別用http://localhost/和http://localhost:81/運行成功。
現用Apache 與 IIS 整合技術只用一個默認80端口。
APACHE 的/CONF/HTTPD.CONF 文件
1、啓用PROXY模塊
LoadModule proxy_module modules/mod_proxy.so 和
LoadModule proxy_http_module modules/mod_proxy_http.so
這兩句的“#”去掉。
2、增加虛擬主機 我把ASP項目放在APACHE 虛擬目錄下
<VirtualHost *>
#ServerAdmin [email protected]
#ServerName www.aaa.com
DocumentRoot "C:/Inetpub/wwwroot"
DirectoryIndex index.html index.htm index.asp
Alias /test "C:/Inetpub/wwwroot"
<Directory "C:/Inetpub/wwwroot">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyPass /test http://localhost:81/
ProxyPassReverse /test http://localhost:81/
</VirtualHost>
3、重啓APACHE
這樣用http://localhost/ 和http://localhost/test/ 就能分別訪問APACHE 默認網站和IIS的ASP網站了。