• Resolved fredperes

    (@fredperes)


    Hi!
    I tried to activate the browsing cache but nginx got an error:

    nginx: [emerg] “location” directive is not allowed here in /etc/nginx/nginx.conf:87

    It would be:

    location ~* \.(txt|xml|js)$ {
    expires 1y;
    }

    What’s wrong?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @fredperes,

    Browser Caching rules depend on your server settings and error like that usually suggests that the rules were added in the wrong place.

    Can you get in touch with your hosting provider and ask them to apply the caching rules for you so you can be sure they are added in a proper place?

    Cheers,
    Predrag

    Thread Starter fredperes

    (@fredperes)

    Looked like the issue was in cloudflare (the website is hosted in digital ocean + CDN cloudflare). When I connected the cloudflare’s API, the problem was solved.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @fredperes

    I’m glad to hear the issue is solved and thank you for letting us know!

    I’ll close this thread for now but if you’ll need any further help with this, please don’t hesitate to re-open it or start a new one.

    Best regards,
    Adam

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error activating browser caching’ is closed to new replies.