Hunter的大杂烩

April 11, 2013

用mod_proxy_ajp来整合apache和tomcat服务

Filed under: 技术话题 — hunter @ 6:22 pm

http://blog.chinaunix.net/uid-10900999-id-2920778.html

pache在2.0以上版本已经支持了mod_proxy的模板支持,使tomcat和apache的整合可以不用通过配置复杂的mod_jk来实现,
httpd -M查看,当前版本是否支持mod_proxy,mod_proxy_ajp,如果没有,可以通过
/usr/local/apache/bin/apxs -i -a -c mod_proxy.c proxy_util.c
/usr/local/apache/bin/apxs -i -a -c mod_proxy_ajp.c ajp*.c
(mod_proxy,mod_proxy_ajp)方法来增加模块


ServerAdmin test@test.com
DocumentRoot /usr/local/$path
ServerName localhost
ServerAlias servername(网站域名)
ProxyPass / ajp://127.0.0.1:8004/
ProxyPassReverse / ajp://127.0.0.1:8004/
ErrorLog logs/tomcatD.gdstcmd-error_log
CustomLog logs/tomcatD.gdstcmd-access_log common

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress