Question

NGINX disable ngx_pagespeed on /backend

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

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;
}

error

Reloading nginx configuration: nginx: [emerg] "pagespeed" directive is not allowed here in /etc/nginx/sites-enabled/100-shopware.domain.de.vhost:83

Does anybody has a solution ?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Should be in vhost.conf

ngx_pagespeed & ngx_pagespeed handler

#include /usr/local/nginx/conf/pagespeed.conf; pagespeed off; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf;

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