Use location directives in Flarum's skeleton, don't repeat with our own.
parent
32fdc4fcf7
commit
1fc1fc9d2e
rootfs/etc/nginx
|
@ -62,27 +62,7 @@ http {
|
|||
client_max_body_size <UPLOAD_MAX_SIZE>;
|
||||
fastcgi_buffers 64 4K;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# Assets cache control
|
||||
# --------------------------------------
|
||||
location ~* \.(?:html|xml|json)$ {
|
||||
expires -1;
|
||||
}
|
||||
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 7d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location ~* \.(?:gif|jpe?g|png|ico|otf|eot|svg|ttf|woff|woff2)$ {
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
include /flarum/app/.nginx.conf;
|
||||
|
||||
# PHP Backend
|
||||
# --------------------------------------
|
||||
|
|
Loading…
Reference in New Issue