ABHIONLINUX
Site useful for linux administration and web hosting

2017/07/14

Enginetron : 502 Bad Gateway

Enginetron is a cpanel plugin which acts as a reverse proxy with apache to improve the server performance. There are certain cases where we get the following errors on the domain after installating enginetron.

502 Bad Gateway

In that case, you can use the following fix.
Open the file  /etc/nginx/custom_rules and add this at the bottom.

[root@server~]# vi /etc/nginx/custom_rules
if ($host ~ "domainname.com") {
set $PROXY_DOMAIN_OR_IP "xx.xx.xx.xx"; }

Domainname.com should be replaced by your domain and xx.xx.xx.xx should be replaced by your IP address.

No comments:

Post a Comment