<code> 4
error_log
/data/logs/slideshare.error.log;
5 server_name ssk.timger.info;
6 proxy_cache_key
"$scheme://$host$request_uri/slideshare"
;
7 proxy_cache cache_one;
8 proxy_max_temp_file_size 4m;
9
10 location / {
11 proxy_cache_valid 200 304 3h;
12 #proxy_cache_valid 301 3d;
13 proxy_cache_valid any 10s;
14 proxy_set_header X-Real-IP
$remote_addr
;
15 proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
16 #向后端传递访客ip
17
18 proxy_set_header Referer http:
19 #强制定义Referer,程序验证判断会用到
20
21 proxy_set_header Host
$host
;
22
23 proxy_pass http:
24
25 proxy_redirect
default
;
26 proxy_redirect http:
27
28
29 proxy_connect_timeout 60;
</code>