• Resolved putterill

    (@putterill)


    I’m using Digital Ocean, Serverpilot and Cloudflare.

    Cloudflare is connected correctly and shows browser caching is set up, pagespeed and your report says it isn’t, putting the suggested code into the ngnix.conf gives the error ” nginx: [emerg] “location” directive is not allowed here…”.

    The instructions on where to place the code are very unclear, “Add the code above to the http or inside server section in the file.” I couldn’t see any server section so I put it in the http section.

Viewing 1 replies (of 1 total)
  • Hi @putterill,

    You need to add the configuration to the server section of your host, it is usually located in the file /etc/nginx/site-enabled/[your-site].conf file. But it might be a different location, depending on the OS and the server configuration.

    Best regards,
    Anton

Viewing 1 replies (of 1 total)

The topic ‘Can’t set browser caching’ is closed to new replies.