All websites showing 502 Bad gateway with customized Apache port

Created:

2016-11-16 13:09:18 UTC

Modified:

2017-04-24 11:16:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

All websites showing 502 Bad gateway with customized Apache port

Applicable to:

  • Plesk for Linux

Symptoms

  1. Websites are down and show 502 Bad gateway error.

  2. Apache works on non-default port:

    # netstat -tulpn | egrep "httpd|apache"
    tcp 0 0 :::81 :::* LISTEN 19784/httpd
    tcp 0 0 :::7081 :::* LISTEN 19784/httpd

Cause

Apache misconfiguration.

Resolution

Check the Apache configuration file and found out what port is listened:

# grep "Listen" /etc/httpd/conf/httpd.conf | grep -v ^#
Listen 81

Change Listen directive to 7080 and in /etc/httpd/conf/httpd.conf and reload httpd service:

# /etc/init.d/httpd reload

Additional information

213913245 - How to change ports of Apache running behind Nginx

Have more questions? Submit a request
Please sign in to leave a comment.