UPDATED: URL rewrite to webmail.example.com to zimbra.example.com

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Posts: 7
Joined: Fri Sep 12, 2014 11:36 pm

UPDATED: URL rewrite to webmail.example.com to zimbra.example.com

Postby MTHead » Mon Dec 04, 2017 7:53 pm


I have the proxy doing the redirect from http to https but I would like to redirect webmail (old hostname) to zimbra (new hostname).

People using old URL are getting certificate errors with webmail.example.com

DNS is setup with a CNAME to new hostname.


UPDATE - the rewrite is here ,,, Can I just change set $sslhost $host; to $sslhost $server_name in nginx.conf.web.http.mode-redirect below

Although I would have to edit:
root@zimbra:/opt/zimbra/conf/nginx/includes# more /opt/zimbra/conf/nginx/includes/nginx.conf.web.http
# HTTP Proxy Configuration
server_name webmail;
server_name zimbra.example.com;

root@zimbra:/opt/zimbra/conf/nginx/includes# more /opt/zimbra/conf/nginx/includes/nginx.conf.web.http.mode-redirect
# Redirect Mode Configuration For HTTP

set $sslport 443;
set $sslhost $host;

if ($sslport != 443) # Standard SSL Port
set $sslhost $host:$sslport;

rewrite ^/(.*)$ https://$sslhost/$1 redirect;

Not sure if this will break anything else.

Return to “Administrators”

Who is online

Users browsing this forum: L. Mark Stone and 31 guests