• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Plesk 502 Bad Gateway

marksman1907

New Pleskian
I am adding new site in plesk, PHP settings, such as editing the process of doing all the sites I get:

502 Bad Gateway
nginx


How can I fix this?

‪CentOS Linux 7.4.1708 (Core)‬

Plesk Onyx
Versiyon 17.5.3 #40
 
I am adding new site in plesk, PHP settings, such as editing the process of doing all the sites I get:

502 Bad Gateway
nginx


How can I fix this?

‪CentOS Linux 7.4.1708 (Core)‬

Plesk Onyx
Versiyon 17.5.3 #40

Hello,
you just have to set a restart interval for Apache. Otherwise it will restart each time you edit php or web server settings.

More informations here : Optimizing Apache Web Server
 
I suggest to follow How to enable/disable graceful restart for Apache? to change the Apache restart to an Apache reload (graceful restart). This is an important change to reduce the number of 502 situations. If you leave it on restart it will still occur. It will not occur every time you make a change to the configuration, but once the restart interval expires, it will occur. This is not the case when you set a an interval and choose graceful restarts instead of restarts. An interval in that case should be at least 360 seconds, better more.
 
Back
Top