一台服务器用Apache做反向代理IIS的设置问题
现有一台服务器,2003系统,IIS+WAMP5 1.7.4,想要设置Apache反向代理IIS,成为JSP,PHP,ASP都能运行的服务器,找了一些资料,设置都出了问题,请教一下具体应该怎么设置?
服务器情况:单IP,多域名,IIS+WAMP已经装好.
希望的效果是,域名直接能访问服务器的各类网站,而不用另外加入端口,包括PHP,JSP跟ASP.
找了的资料有以下的设置:在httpd.conf文件中加入:
NameVirtualHost 12.18.118.114
<VirtualHost 12.18.118.114>
ServerName test1.cn
DocumentRoot “X:/Tools/bbs”
RewriteEngine on
#禁止访问global.asa,global.asax,web.config
RewriteCond %{REQUEST_URI} ^.*(global\.asa|global\.asax|web\.config).*$ [NC]
RewriteRule ^/test/(.*) http://12.18.118.114:8080/$1 [F,L]
#把所有对asp和aspx文件的请求转到iis处理
RewriteCond %{REQUEST_URI} ^/.*(\.asp)x?\??.*$ [NC]
RewriteRule ^/test/(.*) http://12.18.118.114:8080/$1 [P]
#把html文件的请求转到iis处理
RewriteCond %{REQUEST_URI} ^/.*(\.html)?\??.*$ [NC]
RewriteRule ^/test/(.*) http://12.18.118.114:8080/$1 [P]
#请使用相同目录名,否则子目录路径会出错,导致图片、css等放在子目录的文件调用出错,此时浏览器输入“a.b.c/test/index.html”和“a.b.c/test/index.asp”时都能正常显示页面。
#特别注意,此段代码别加到<Directory “D:/*“> 和</Directory>之间。
<Directory “G:/Tools/dvbbs8“>
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
然而加入了这些代码,Apache连启动都启动不了了,希望有经验的各位帮个忙,谢谢.