enable proxy cache mode
This commit is contained in:
@@ -5,6 +5,7 @@ http {
|
|||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
client_max_body_size 500M;
|
client_max_body_size 500M;
|
||||||
|
server_names_hash_bucket_size 1024;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header X-Forwarded-Scheme $scheme;
|
proxy_set_header X-Forwarded-Scheme $scheme;
|
||||||
proxy_set_header Accept-Encoding "";
|
proxy_set_header Accept-Encoding "";
|
||||||
@@ -16,6 +17,10 @@ http {
|
|||||||
#proxy_set_header Connection 'upgrade';
|
#proxy_set_header Connection 'upgrade';
|
||||||
#proxy_cache_bypass $http_upgrade;
|
#proxy_cache_bypass $http_upgrade;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/plain application/xml;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@@ -40,6 +45,9 @@ http {
|
|||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
resolver 127.0.0.1 ipv6=off valid=40s; # The DNS IP server
|
resolver 127.0.0.1 ipv6=off valid=40s; # The DNS IP server
|
||||||
|
|
||||||
|
#https://www.tweaked.io/guide/nginx-proxying/
|
||||||
|
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user