1)当一台电脑上有两个tomcat,一个apache,哪个先启动,哪个先占用8009端口。最好修改3个端口(8005,8080,8009)
2)tomcat可以正常运行(http://localhost:8080/**),apache不能绑定tomcat运行(http://localhost/**)
<VirtualHost 电脑名:80>
ServerName as10:80
电脑名处的域名不能解析导致。可以改为* <VirtalHost *:80>
3)使用mod_jk, workers.properties
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
list:ajp13名字随便取, host:localhost 代表哪台电脑,可以使用ip 域名 localhost。port:8009 主要依靠端口确定使用哪个tomcat。
4)<VirtualHost *:80>
#################### /test ###################
# Static files
Alias /test "C:/tomcat/./webapps/test"
<Directory "C:/tomcat/./webapps/test">
Options -Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
#Allow direct access to ...
<Location "/test/css">
AllowOverride None
Allow from all
</Location>
# Deny direct access to
<Location "/tock/WEB-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /test/servlet/AxisServlet ajp13
JkMount /test/servlet/AdminServlet ajp13
JkMount /test/AppLogic/* ajp13
JkMount /test/login ajp13
JkMount /test/*.jsp ajp13
</VirtualHost>
SSL 443与80配置相同