Hosting static files on Zimbra Proxy: Difference between revisions

(Created page with "To host static content such as logos or banners on the proxy node, we need to modify the nginx configuration files within ZCS. This is useful when implementing images on signatur...")
 
No edit summary
Line 32: Line 32:
4) Files can be now reached by going to http(s)://<proxyurl>/logos/<filename>, for example:
4) Files can be now reached by going to http(s)://<proxyurl>/logos/<filename>, for example:
http://webmail.domain.com/logos/logo.jpg
http://webmail.domain.com/logos/logo.jpg
If you don't have a proxy (single server installation, or just no proxy) you might be interested in http://wiki.zimbra.com/wiki/Hosting_static_files_on_Zimbra_Mailbox_Store

Revision as of 15:39, 16 June 2011

To host static content such as logos or banners on the proxy node, we need to modify the nginx configuration files within ZCS. This is useful when implementing images on signatures in a multi-server installation. We are going to reuse an already existing folder on proxy nodes which sounds about right for the purpose.

On the proxy node: 1) Add logo files and other graphics needed within the /opt/zimbra/banners folder.

2) We are now going to map a relative "logos" path so that URLs matching the rule will be caught and the local contents will be served. The next modifications have to be done, pay attention to the position within the files, since it matters:

/opt/zimbra/conf/nginx/templates/nginx.conf.web.http.template:

 [...]
   location = /50x.html {
   root   /opt/zimbra/banners;
   }
   location /logos/ {
       alias /opt/zimbra/banners/;
   }
 [...]


/opt/zimbra/conf/nginx/templates/nginx.conf.web.https.template:

  [...]
       # Fudge inter-mailbox redirects (kludge)
       proxy_redirect http://$relhost/ https://$http_host/;
   }
   location /logos/ {
       alias /opt/zimbra/banners/;
   }
 }

3) Restart service, configuration rewriting will occur. This won't survive ZCS upgrades though, so take note of these changes.

4) Files can be now reached by going to http(s)://<proxyurl>/logos/<filename>, for example: logo.jpg

If you don't have a proxy (single server installation, or just no proxy) you might be interested in http://wiki.zimbra.com/wiki/Hosting_static_files_on_Zimbra_Mailbox_Store

Jump to: navigation, search