need help with ngix 502

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
tehseen
Posts: 20
Joined: Sat Oct 26, 2019 12:46 pm

need help with ngix 502

Post by tehseen »

Any one help me to solve this issue , Im using docker apche container as backend and frontend zimbra nginx. I,ve used following code but getting 502 bad gateway.

# *** Beginning of customizations ***

if ($host = www.example.com) {
return 550;
}

error_page 550 = @custom;

location @custom { # www.example.com
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://127.0.0.1:81;
proxy_redirect default;
}


Ive added letencrypt ssl cert wildcard for my domain. m mail.example.com zimbra working fine but docker container getting 502 how do I make it work with zimra nginx .
Post Reply