技术解析
server 配置:
server {
listen 80;
server_name insist.com www.insist.com;
root /var/www/insist.com;
index index index.html index.htm index.nginx-debian.html;
location = /django {
return 302 /django/;
}
location /django/ {
proxy_pass http://127.0.0.1:8000/;
proxy_redirect / /django/;
set $expire_time "20s";
if ($upstream_status = 301大带宽服务器){ set $expire_time "40s"; }
expires $expire_time;
}
搜索了几个小时没找到完美解决方案,请各位帮忙看一看多谢了,多谢了!