How To

Zammad Solve CSRF token verification failed on login

If you get the error message “CSRF token verification failed” when attempting to login to your Zammad Web Dashboard, we’ve got a solution for you. In most installations of Zammad, whether dockerized or direct packages installations on a base OS, access is proxied via Nginx or Apache web server.

Original content from computingforgeeks.com - post 63141

The “Can’t login because of CSRF token errors” is usually witnessed on systems with more than one proxy server. To solve the issue we need to tell our web server which connection type was used by the user. Open your Zammad proxy configuration file.

For Nginx users

If you are running Zammad behind Nginx proxy server, open your virtual host configuration and locate both directives proxy_set_header X-Forwarded-Proto and replace $scheme by https.

sudo vim /etc/nginx/conf.d/zammad.conf

It should look like below after the changes.

proxy_set_header X-Forwarded-Proto https;

Replace all occurrences under the following blocks:

  • location /ws
  • location /cable
  • location /

Restart nginx after making the changes:

sudo systemctl restart nginx

For Apache users

Open your virtual host configuration just above the first ProxyPass directive insert:

RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on

Restart Apache web server after the changes are made:

sudo systemctl restart apache2

Keep reading

How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Fedora How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Ubuntu Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Anthropic Terraform Provider: Claude Managed Agents as Code AI Anthropic Terraform Provider: Claude Managed Agents as Code Install Nix Package Manager on Fedora 45 / 44 with SELinux Fedora Install Nix Package Manager on Fedora 45 / 44 with SELinux Advantages of Incorporating Technology in Education How To Advantages of Incorporating Technology in Education

Leave a Comment

Press ESC to close