gldtn
Well-known member
Hello,
May someone help with expire headers on nginx?
Here is my setup:
Server block:
But I still get a "C" over at https://tools.pingdom.com/
I know it's working because before I was getting an F, any suggestion on what I actually need and don't need? Also I'm not sure if it's a good idea to set everything to max like I did.
I followed this guide here: https://www.digitalocean.com/commun...ng-with-nginx-s-header-module-on-ubuntu-20-04
Thanks in advance!
May someone help with expire headers on nginx?
Here is my setup:
NGINX:
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
text/javascript max;
text/x-javascript max;
text/plain max;
text/xml max;
application/atom+xml max;
application/geo+json max;
application/javascript max;
application/x-javascript max;
application/json max;
application/ld+json max;
application/manifest+json max;
application/rdf+xml max;
application/rss+xml max;
application/xhtml+xml max;
application/xml max;
~font/ max;
~image/ max;
}
Server block:
NGINX:
expires $expires;
But I still get a "C" over at https://tools.pingdom.com/
I know it's working because before I was getting an F, any suggestion on what I actually need and don't need? Also I'm not sure if it's a good idea to set everything to max like I did.
I followed this guide here: https://www.digitalocean.com/commun...ng-with-nginx-s-header-module-on-ubuntu-20-04
Thanks in advance!
Last edited: