[SOLVED] CWP 502 Bad Gateway Cwpsrv

If your VPS is running CentOS and you use Control Web Panel (CWP), you may get this error at one time or the other: 502 Bad Gateway cwpsrv

502 bad gateway cwpsrv
CWP 502 Bad Gateway Cwpsrv Error

For me, I got the error when I deleted a User through the CWP admin interface. When this error shows up, you cannot log into your CWP admin panel to carry out any tasks.

502 Bad Gateway Cwpsrv [SOLVED]

There are two ways you can solve the 502 Bad Gateway Cwpsrv error. In most cases, any 502 Bad Gateway error can be solved by running this command:

sh /scripts/restart_cwpsrv

If running the above command does not solve your problem, here’s the second option:

First off, you should check the phpfpm service to confirm that it is running. Type this command through SSH:

systemctl status cwp-phpfpm

If the service is not running and cannot start, you have to find the User that is producing the error. To do so, check this file /usr/local/cwp/php71/var/log/php-fpm.log

tail /usr/local/cwp/php71/var/log/php-fpm.log

You will see the name of User has an error (eg. stetho.conf).

Delete the file stetho.conf from /usr/local/cwp/php71/etc/php-fpm.d/users/stetho.conf   by running this command:

rm -f /usr/local/cwp/php71/etc/php-fpm.d/users/stetho.conf

After this, run the following command to start Phpfpm

systemctl start cwp-phpfpm

From here, the 502 Bad Gateway cwpsrv should have been solved.

Let me know in the comment section below whether you have any questions.

Written By
I Cozens
More from I Cozens

[SOLVED] Error Updating Plugin: Could not remove the old plugin

If you have a WordPress site, you may come across an error...
Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.