Просмотр исходного кода

updated nginx caching templates

Serghey Rodin 12 лет назад
Родитель
Сommit
f6d5e24edc

+ 1 - 0
install/rhel/nginx.conf

@@ -83,6 +83,7 @@ http {
     # Cache
     proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
     proxy_temp_path  /var/cache/nginx/temp;
+    proxy_cache_key "$host$request_uri $cookie_user";
     proxy_ignore_headers Expires Cache-Control;
     proxy_cache_use_stale error timeout invalid_header http_502;
     proxy_cache_valid any 3d;

+ 1 - 1
install/rhel/templates/web/nginx/caching.stpl

@@ -10,7 +10,7 @@ server {
         proxy_pass      http://%ip%:%web_port%;
 
         proxy_cache cache;
-        proxy_cache_valid 10m;
+        proxy_cache_valid 15m;
         proxy_cache_valid 404 1m;
         proxy_no_cache $no_cache;
         proxy_cache_bypass $no_cache;

+ 1 - 1
install/rhel/templates/web/nginx/caching.tpl

@@ -7,7 +7,7 @@ server {
         proxy_pass      http://%ip%:%web_port%;
 
         proxy_cache cache;
-        proxy_cache_valid 10m;
+        proxy_cache_valid 15m;
         proxy_cache_valid 404 1m;
         proxy_no_cache $no_cache;
         proxy_cache_bypass $no_cache;