Ubuntu AH00959:ap\u代理\u连接\u后端禁用工作程序
要在ubuntu上与apache2一起使用反向代理:Ubuntu AH00959:ap\u代理\u连接\u后端禁用工作程序,ubuntu,apache2,reverse-proxy,ubuntu-16.04,reverse,Ubuntu,Apache2,Reverse Proxy,Ubuntu 16.04,Reverse,要在ubuntu上与apache2一起使用反向代理: <VirtualHost test.com:80> ProxyPreserveHost On ProxyRequests On ServerName test.com ServerAdmin webmaster@localhost DocumentRoot /var/www/test ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/acces
<VirtualHost test.com:80>
ProxyPreserveHost On
ProxyRequests On
ServerName test.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/test
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass /login http://127.0.0.1:8080/login
ProxyPassReverse /login http://127.0.0.1:8080/login
ProxyPass /api http://127.0.0.1:8080/api
ProxyPassReverse /api http://127.0.0.1:8080/api
谢谢。其他人找到了答案: 我试过了,它对我有用 在Apache中编辑vhost
ProxyPass /login http://127.0.0.1:8080/login/ retry=0
在我的情况下,我执行了以下命令:
/usr/sbin/setsebool -P httpd_can_network_connect 1
从我这边,检查selinux:
getenforce
==> Enforcing
setenforce Permissive
getenforce
==> Permissive
然后:服务httpd重启
并为下次重新启动定义参数vi/etc/selinux/config是否确定?您指向的链接确实提到了
httpd\u can\u network\u connect on
SElinux boolean。这就是造成这些错误的原因。在我的ProxyPass中添加retry=0,客户端连接不会被终止(运行curl/wget,页面将被抓取,然后连接将保持活动状态)。请注意,Ubuntu中没有启用SELinux。
getenforce
==> Enforcing
setenforce Permissive
getenforce
==> Permissive