All websites showing '502 Bad gateway' error

Refers to:

  • Plesk for Linux

Created:

2016-11-16 13:09:18 UTC

Modified:

2016-12-21 20:04:33 UTC

0

Was this article helpful?


Have more questions?

Submit a request

All websites showing '502 Bad gateway' error

Symptoms

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

  2. Apache works on non-default port:

    # netstat -tulpn | grep httpd
    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

11232 - How to change Apache ports from default 80/433 to custom values

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