[转] Apache + Tomcat: Using mod_proxy instead of AJP 转发 80 端口

阅读更多
原文地址: http://stackoverflow.com/questions/956361/apache-tomcat-using-mod-proxy-instead-of-ajp

以 CentOS 为例:
新建如下文件:
vim /etc/httpd/conf.d/proxy.conf
内容如下:

  ServerName public.server.name

  ProxyRequests Off
  ProxyPreserveHost On

  
    Order deny,allow
    Allow from all
  

  ProxyPass / http://localhost:8080/
  ProxyPassReverse / http://localhost:8080/
之后执行如下命令:
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1
最后重启 Apache 即可:
sudo systemctl restart httpd

你可能感兴趣的:(tomcat,apache,mod_proxy)