[转] Apache + Tomcat: Using mod_proxy instead of AJP 转发 80 端口
程序员文章站
2022-07-15 13:56:37
...
原文地址: http://*.com/questions/956361/apache-tomcat-using-mod-proxy-instead-of-ajp
以 CentOS 为例:
新建如下文件:
以 CentOS 为例:
新建如下文件:
vim /etc/httpd/conf.d/proxy.conf内容如下:
<VirtualHost *:80> ServerName public.server.name ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost>之后执行如下命令:
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1最后重启 Apache 即可:
sudo systemctl restart httpd