Apache Reverse Proxy to IIS10 - Connection Permission denied

Nasheayahu 40 Reputation points
2023-10-16T16:51:44.83+00:00

Morning,

I'm using Apaches' reverse proxy (CentOS 9 VM) for connections to a IIS10 (Server 2019 Essential VM) and need help solving;

[Mon Oct 16 09:55:10.893192 2023] [proxy:error] [pid 64373:tid 64529] (13)Permission denied: AH00957: http: attempt to connect to 10.30.60.56:80 (domain.com:80) failed

[Mon Oct 16 09:55:10.893218 2023] [proxy_http:error] [pid 64373:tid 64529] [client 213.81.220.183:49079] AH01114: HTTP: failed to make connection to backend: domain..com

<VirtualHost *:80>
.
..
...

    ProxyPass        "/"  "http://serveriis.domain.com/"     
    ProxyPassReverse "/"  "http://serveriis.domain.com/"     
    LogLevel info

</VirtualHost>


I'm able to get to the web app normally via browser by http://serveriis.domain.com, so what else on the server do I need to set on the Windows Server to allow this connection via reverse proxy?

Windows development | Internet Information Services
Windows for business | Windows Server | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Nasheayahu 40 Reputation points
    2023-10-16T18:23:50.0833333+00:00

    Found the problem, since I'm CentOS with SELinux enforcing, SELinux is preventing /usr/sbin/httpd from name_connect access on the tcp_socket port 80. so I had to add some policies according to SELinux access control errors:

    setsebool -P httpd_can_network_connect 1
    setsebool -P httpd_graceful_shutdown 1
    setsebool -P httpd_can_network_relay 1
    setsebool -P nis_enabled 1
    ausearch -c 'httpd' --raw | audit2allow -M my-httpd
    semodule -X 300 -i my-httpd.pp

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.