大侠们,救急啊,关于apache转发的问题。
我有个一级域名个二级域名 www.aaa.com 和 bbs.aaa.com
我现在apache的端口号是80 tomcat的是8080 iis的是8181
我在httpd.conf 文件里写了下面的代码 但是输入www.aaa.com 和bbs.aaa.com 都是访问的iis上的网站啊,这是什么原因啊?
<VirtualHost *:80>
ProxyPreserveHost On
ServerAdmin admin@wwksw.com
DocumentRoot "E:/apache/docs/dummy-host2.somenet.com"
DirectoryIndex index.html index.htm index.aspx
ServerName www.aaa.com
DefaultLanguage zh-CN
AddDefaultCharset GB2312
ProxyPass / http://www.aaa.com:8181/
ProxyPassReverse / http://www.aaa.com:8181/
ErrorLog "logs/dummy-host2.somenet.com-error.log"
CustomLog "logs/dummy-host2.somenet.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@wwksw.com
ServerName bbs.aaa.com
DirectoryIndex index.html index.htm index.jsp
DocumentRoot "E:\Tomcat 6.0\webapps\Cadres"
JkMount /* ajp13
JkAutoAlias "E:\Tomcat 6.0\webapps\Cadres"
Options Indexes FollowSymLinks
<Directory "E:\Tomcat 6.0\webapps\Cadres">
Options IncludesNoExec
Allow from all
</Directory>
</VirtualHost>
------解决方案--------------------
<VirtualHost *:80>
ProxyPreserveHost On
ServerAdmin admin@wwksw.com
DocumentRoot "E:/apache/docs/dummy-host2.somenet.com"
DirectoryIndex index.html index.htm index.aspx
ServerName www.aaa.com
DefaultLanguage zh-CN
AddDefaultCharset GB2312
ProxyPass / http://www.aaa.com:8181/
ProxyPassReverse / http://www.aaa.com:8181/
ErrorLog "logs/dummy-host2.somenet.com-error.log"
CustomLog "logs/dummy-host2.somenet.com-access.log" common
</VirtualHost>
8081 配成tomcat的端口