先改 hppt.conf
LoadModule proxy_http_module modules/mod_proxy_http.so
ServerAdmin [email protected]
ServerName http://www.server110.com
ErrorLog logs/www.server110.com-error.log
CustomLog logs/www.server110.com-access.log common
ProxyPass /hn_edu http://localhost:8080/hn_edu
ProxyPass / http://localhost:8080/hn_edu/
ProxyPassReverse / http://localhost:8080/hn_edu/
</VirtualHost>
2、使用JK模块
下载mod_jk.so 放到modules目录里这个目录下都是SO文件
在httpd.conf 最后加上
=============================
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkMount /yyy worker1
==============================
在conf目录下创建文件workers.properties
文 件内容如下,注意这里的8009是TOMCAT配置文件server.xml内
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> AJP的端口,如果你改过了那这边也要一样
==============================
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=127.0.0.1
worker.worker1.port=8009
===============================