Websites shows 502 Bad Gateway or 404 Not Found errors while Apache is running properly

Created:

2016-11-16 13:02:24 UTC

Modified:

2017-05-18 08:12:59 UTC

13

Was this article helpful?


Have more questions?

Submit a request

Websites shows 502 Bad Gateway or 404 Not Found errors while Apache is running properly

Applicable to:

  • Plesk for Linux

Symptoms

  • Websites show the 502 Bad Gateway or 404 Not Found errors, but the files exist.

  • Website show 502 Bad Gateway when trying to connect over HTTPS or redirect to other site.

  • Apache process is running.

Cause

Web server configuration files are corrupted or absent, or module is not loaded.

Resolution

  • Disable Nginx service:
  # /usr/local/psa/admin/bin/nginxmng --disable
  • Move all vhost's config files from /etc/nginx/plesk.conf.d/vhosts to a temporary directory:
  # mkdir /root/support_plesk && mv /etc/nginx/plesk.conf.d/vhosts/* /root/support_plesk
  • Enable Nginx service:
  # /usr/local/psa/admin/bin/nginxmng --enable
# /usr/local/psa/admin/bin/nginxmng --status
Enabled
  • Or using Plesk UI:

Go to Plesk > Tools & Settings > Services Management

Click Stop on Reverse Proxy Server ( nginx ) and then Start .

  • Make sure that cgid Apache Module is enabled in Plesk > Tools & Settings > Apache Web Server.
Have more questions? Submit a request

2 Comments

Please sign in to leave a comment.