Change Favicon without dirty web server-hack


If you are a Zammad Support or hosted customer and experience a technical issue, please refer to: using your zammad-hostname / or company contract.

  • Used Zammad version: 2.6.x
  • Used Zammad installation source: (source, package, …) DEB
  • Operating system: Ubuntu 16.04
  • Browser + version: Chrome 68.0.3440.106

Expected behavior:

  • Change Favicon

Actual behavior:

  • My CEO wants to see our Logo as favicon but I don’t see any way to change it without a dirty webserver-hack. Does anybody know where to change it in source-code?


first of all:
Any change to source code or Zammad related files are not Update-safe!

Personally, I would’nt bother touching Zammad files and would prefer the “dirty” webserver “hack”.
Because: nginx and apache2 both support URL redirections - so all you have to do is edit the webserver config:


  location = /favicon.ico {
    access_log off; log_not_found off;

simply gets

  location = /favicon.ico {
    access_log off; log_not_found off;
    alias /var/www/media/images/favicon.X.ico;

where “alias /var/www/media/images/favicon.X.ico;” is where ever your icon is located (and nginx can read it).


Below line “DocumentRoot “/opt/zammad/public”” simply add the following (hint: You need mod_rewrite being enabled here!)

RewriteEngine On
RewriteRule /favicon.ico https://whereeveritmight.lay [L, R=301]

Another hint for apache: You can also server the favicon locally, but would need to work the config a bit further.

Please note that none of the above has been tested by me, it “should” work. :stuck_out_tongue:

I hope that this suites your needs.


Hi @MrGeneration thanks for your tip.

as our favicon is stored centralized on our server, I ended in adding a rewrite-rule for our nginx:

location  /favicon.ico {
    access_log off; log_not_found off;
    rewrite ^/favicon.ico <STORAGE.SERVER.URL>/favicon.ico last;

this as hint for everybody who is in the same situation.


Perfect, thanks for letting the community know :slight_smile:

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.