Use location directives in Flarum's skeleton, don't repeat with our own. (#48)
parent
32fdc4fcf7
commit
519cab5e82
|
@ -29,29 +29,6 @@ http {
|
||||||
uwsgi_temp_path /tmp/uwsgi 1 2;
|
uwsgi_temp_path /tmp/uwsgi 1 2;
|
||||||
scgi_temp_path /tmp/scgi 1 2;
|
scgi_temp_path /tmp/scgi 1 2;
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_comp_level 5;
|
|
||||||
gzip_min_length 512;
|
|
||||||
gzip_buffers 4 8k;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_disable "msie6";
|
|
||||||
gzip_types
|
|
||||||
text/css
|
|
||||||
text/javascript
|
|
||||||
text/xml
|
|
||||||
text/plain
|
|
||||||
text/x-component
|
|
||||||
application/javascript
|
|
||||||
application/x-javascript
|
|
||||||
application/json
|
|
||||||
application/xml
|
|
||||||
application/rss+xml
|
|
||||||
application/vnd.ms-fontobject
|
|
||||||
font/truetype
|
|
||||||
font/opentype
|
|
||||||
image/svg+xml;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen <FLARUM_PORT>;
|
listen <FLARUM_PORT>;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
@ -62,27 +39,7 @@ http {
|
||||||
client_max_body_size <UPLOAD_MAX_SIZE>;
|
client_max_body_size <UPLOAD_MAX_SIZE>;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
|
|
||||||
location / {
|
include /flarum/app/.nginx.conf;
|
||||||
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";
|
|
||||||
}
|
|
||||||
|
|
||||||
# PHP Backend
|
# PHP Backend
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue