@@ -0,0 +1,18 @@
|
||||
#禁用反向代理缓存模板
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name {$server_name};
|
||||
index {$index};
|
||||
|
||||
location / {
|
||||
default_type text/html;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host {$header_host};
|
||||
proxy_pass {$proxy_pass};
|
||||
}
|
||||
|
||||
access_log {$logs_path}.access.log combined; #access_log end
|
||||
error_log {$logs_path}.error.log crit; #error_log end
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#启用反向代理缓存模板
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name {$server_name};
|
||||
index {$index};
|
||||
|
||||
location / {
|
||||
default_type text/html;
|
||||
proxy_cache hyproxy;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host {$header_host};
|
||||
proxy_pass {$proxy_pass};
|
||||
if ($http_Cache_Control = "no-cache") {
|
||||
rewrite ^(.*)$ /purge$1 last;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ /purge(/.*){
|
||||
proxy_cache_purge hyproxy $scheme://$host$1$is_args$args;
|
||||
}
|
||||
|
||||
access_log {$logs_path}.access.log combined; #access_log end
|
||||
error_log {$logs_path}.error.log crit; #error_log end
|
||||
}
|
||||
Reference in New Issue
Block a user