(13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed

(13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed – this error is because of httpd/apache2 has been denied permission to connect to IP address and port.

Main reason for this error is SELinux. Here SELinux not permitting httpd/apache2 to make network connections.

To resolve it, you need to change an SELinux boolean value (which will automatically persist across reboots). You may also required to restart httpd/apache2 to reset the proxy worker, although this isn’t strictly required.

Run either of following command to allow SELinux to permit httpd/apache2 to make network connections:

$ /usr/sbin/setsebool httpd_can_network_connect 1

or

$ /usr/sbin/setsebool httpd_can_network_connect true

Then restart httpd/apache2.

12 comments on “(13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed

  1. In RED HAT 6.3 (RHEL) i have used:
    /usr/sbin/setsebool httpd_can_network_connect true
    This [SOLVED] my problem!!!!! after 6 hours searching!! Thanks!

  2. Hi, very useful. However I found that this got lost on reboot (Centos/RHEL 6.3).

    I worked round with “-P”
    /usr/sbin/setsebool -P httpd_can_network_connect true

    Not sure if there’s is a bug in RHEL, but followed the workaround
    See

Leave a comment