فهرست منبع

updated nginx caching templates

Serghey Rodin 12 سال پیش
والد
کامیت
f6d5e24edc
3فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      install/rhel/nginx.conf
  2. 1 1
      install/rhel/templates/web/nginx/caching.stpl
  3. 1 1
      install/rhel/templates/web/nginx/caching.tpl

+ 1 - 0
install/rhel/nginx.conf

@@ -83,6 +83,7 @@ http {
     # Cache
     # Cache
     proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
     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_temp_path  /var/cache/nginx/temp;
+    proxy_cache_key "$host$request_uri $cookie_user";
     proxy_ignore_headers Expires Cache-Control;
     proxy_ignore_headers Expires Cache-Control;
     proxy_cache_use_stale error timeout invalid_header http_502;
     proxy_cache_use_stale error timeout invalid_header http_502;
     proxy_cache_valid any 3d;
     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_pass      http://%ip%:%web_port%;
 
 
         proxy_cache cache;
         proxy_cache cache;
-        proxy_cache_valid 10m;
+        proxy_cache_valid 15m;
         proxy_cache_valid 404 1m;
         proxy_cache_valid 404 1m;
         proxy_no_cache $no_cache;
         proxy_no_cache $no_cache;
         proxy_cache_bypass $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_pass      http://%ip%:%web_port%;
 
 
         proxy_cache cache;
         proxy_cache cache;
-        proxy_cache_valid 10m;
+        proxy_cache_valid 15m;
         proxy_cache_valid 404 1m;
         proxy_cache_valid 404 1m;
         proxy_no_cache $no_cache;
         proxy_no_cache $no_cache;
         proxy_cache_bypass $no_cache;
         proxy_cache_bypass $no_cache;