ENABLE CACHING - For NGINX servers

Hey guys! this is my first contact with an cloud server with NGINX, so im using the hummingbird plugin to improve the speed, but a cant find the correct place to paste this code:

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

location ~* \.(css)$ {
    expires 8d;
}

location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$ {
    expires 8d;
}

location ~* \.(jpg|jpeg|png|gif|swf|webp)$ {
    expires 8d;
}

I hope you guys could help me with this =D

  • James Morris

    Hello Guilherme,

    I hope you are well today.

    Per the instructions in Hummingbird, these directives need added to /etc/nginx/nginx.conf or /usr/local/nginx/conf/nginx.conf. To make these changes, you will have to have privileged access to the server file structure. If your cloud hosting account doesn't allow sudo or root level access, you will have to contact your hosting provider to setup these directives for you.

    I hope this clarifies a bit. Let us know if you have any further questions. We'll be happy to help! :slight_smile:

    Best regards,

    James Morris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.