NGINX disable ngx_pagespeed on /backend

Posted March 26, 2015 11.9k views

I`m using Shopware and i want to disable the pagespeed plugin for my backend which is accessible trough

Now i had this location block - but it does not work, i`m getting an error in my config if i reload nginx

location /backend/ {
pagespeed off;


Reloading nginx configuration: nginx: [emerg] "pagespeed" directive is not allowed here in /etc/nginx/sites-enabled/

Does anybody has a solution ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

You could instead disable all Pagespeed filters in that location block.

Should be in vhost.conf

ngxpagespeed & ngxpagespeed handler

include /usr/local/nginx/conf/pagespeed.conf;

pagespeed off;

include /usr/local/nginx/conf/pagespeedhandler.conf;

include /usr/local/nginx/conf/pagespeedstatslog.conf;