AH00959:ap_proxy_connect_backend 禁用工人

AH00959: ap_proxy_connect_backend disabling worker

在 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}/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

我有 apache2 错误

(111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 60s

谢谢。

其他人找到了答案:ap_proxy_connect_backend disabling worker for (127.0.0.1)

我试过了,对我有用。

在 Apache 中编辑您的虚拟主机

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