updated movim template
This commit is contained in:
parent
01c262b71d
commit
4949f3349f
|
@ -7,6 +7,7 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|||
|
||||
{% block root %}
|
||||
root {{ nginx_www_dir }}{{ item.root }};
|
||||
index index.php;
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -25,11 +26,8 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|||
|
||||
{% else %}
|
||||
location / {
|
||||
index index.php;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^/(.*) /index.php?query=$1 last;
|
||||
}
|
||||
set $no_cache 1;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
@ -43,10 +41,6 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|||
log_not_found off;
|
||||
}
|
||||
|
||||
location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/(config|temp|log)/ {
|
||||
deny all;
|
||||
}
|
||||
|
@ -56,6 +50,12 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
|
||||
fastcgi_cache nginx_cache;
|
||||
fastcgi_cache_valid any 7d;
|
||||
fastcgi_cache_bypass $no_cache;
|
||||
fastcgi_no_cache $no_cache;
|
||||
}
|
||||
|
||||
{% if item.ws is defined and item.ws == 'true' %}
|
||||
|
@ -73,13 +73,8 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|||
{% endif %}
|
||||
{% if item.pic_cache is defined and item.pic_cache == 'true' %}
|
||||
location /picture {
|
||||
include fastcgi_params;
|
||||
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
|
||||
fastcgi_cache nginx_cache;
|
||||
fastcgi_cache_key $request_method$host$request_uri;
|
||||
fastcgi_cache_valid any 1h;
|
||||
set $no_cache 0;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue