AH00959: ap_proxy_connect_backend disabling worker

Viewed 35401

To use reverse proxy with apache2 on ubuntu :

<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

i have apache2 errors

(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

thanks.

3 Answers

In my case, I have executed the command below:

/usr/sbin/setsebool -P httpd_can_network_connect 1

from my side, check selinux :

getenforce
==> Enforcing
setenforce Permissive
getenforce
==> Permissive

then : service httpd restart

and define the parameter fot the next reboot vi /etc/selinux/config

Related