ansible-personal/roles/nginx/templates/wordpress.j2
Alan Orth 42b893b2a7
roles/nginx: Add expires to static files
Signed-off-by: Alan Orth <alan.orth@gmail.com>
2014-10-10 11:05:42 +03:00

16 lines
411 B
Django/Jinja

# try for WordPress index.php in /
# fall back to index.php + args (passed to php5-fpm later)
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 7d;
add_header Cache-Control "must-revalidate";
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;