ZCS 8 FOSS - Web proxy Issues

Hi All,

I have a strange issue with Web Proxy. My Config is a Multiserver install on RHEL 6.2 64 bit. Have Web Proxy installed on a separate box. The issue is while I am able to login using web sometimes, at other times (seems quite random) it re-directs the requests directly to the mailbox server. And I am not getting a clue as to when this happens? Isn't the whole idea of proxy that the user doesn't directly connect to the mailbox server? I have been trying to look at the log files (/opt/zimbra/log/ nginx.log & nginx.access.log). No clue.

At this point I marked the last message i the above log file. Then tried to login, and captured all the lines that came in. Later after several unsuccessful logins, waited till I was able to successfully login and then again, captured the output of the log. Then compared the lines. The very first line differs with different http codes as shown below:

Hi,
(This answer is for those who have met this issue)
Your problem is due the configuration parameter "zimbraMailReferMode" which it's value is "wronghost" (i think )
Use the following command to check it (on you reverse-proxy Server):
zimbra$ zmprov gcf zimbraMailReferMode
You should change it to "reverse-proxied" using the following commands
zimbra$ zmprov mcf zimbraMailReferMode reverse-proxied