If you've just installed CentOS Web Panel and you've visited the login page only to see a "502 Bad Gateway" error, give this solution a try.

Run the following command:

sh /scripts/restart_cwpsrv

I hope that works for you. It worked for me!

 

More information on this error can be found at https://www.icozens.com/cwp-502-bad-gateway-cwpsrv/