Plesk Login Gives You a “502 Bad Gateway” Nginx Error

Posted January 6, 2016
by Seth Harden

Plesk isn’t quite sure the cause of this error but it seems to possibly be linked to exceeding your virtual disk space quota.

Here’s a fix that has worked for me.

Access your server via SSH.

Then you will need to edit the following file /etc/sw-cp-server/config

I typically use vi editor to edit files inside of SSH

So the command will be vi

Then scroll down till you find:

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
Use the r button to write over 16 and 32 till you have:

fastcgi_buffers 32 32k;
fastcgi_buffer_size 64k;
Then press shift+:
Then type in wq! which will save the file and quit vi editor

Next, restart the following services:

/etc/init.d/sw-cp-server restart
/etc/init.d/sw-engine restart
You might get an error when restarting sw-engine about exceeding your disk quota. If so check out this article I wrote on cleaning off large files off your server:

http://programming.sethharden.com/find-largest-files-on-server/

That should solve your issue.

Posted In CategoriesPlesk| Tagged Tags