Permission Denied When Using Custom Port on Apache Reverse Proxy

I have recently used custom port when on-boarding one platform in my DC using Apache. This Apache will act as reverse proxy, so when the customer try to connect from outside or internet it will go thru port 443 a.k.a HTTPS but redirected to custom port to back-end server. This is the common situation in order to secure your back-end infrastructure and reduce against attach from outside.

So, let’s say for example i am using custom port 8081. Upon configuring the script i found the Apache server is not started due to following reason:

— Unit httpd.service has begun starting up.
Mar 23 17:56:45 rproxy httpd[1586]: (13)Permission denied: AH00072: make_sock: could not bind to address 192.168.0.9:8081
Mar 23 17:56:45 rproxy httpd[1586]: no listening sockets available, shutting down
Mar 23 17:56:45 rproxy httpd[1586]: AH00015: Unable to open logs
Mar 23 17:56:45 rproxy systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 17:56:45 rproxy kill[1588]: kill: cannot find process “”
Mar 23 17:56:45 rproxy systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 23 17:56:45 rproxy systemd[1]: Failed to start The Apache HTTP Server.
— Subject: Unit httpd.service has failed
— Defined-By: systemd

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit httpd.service has failed.

— The result is failed.

It is because of the SELINUX does not allow you to do so. Hence in order to fix this all you need to just use following command: setenforce 0.

Reboot your server as well as restart the Apache service and you good to go!

Leave a Reply

Your email address will not be published. Required fields are marked *