您好,直接再反向代理配置文件中增加一个排除规则,如是多个目录,自行依次添加。
如是浏览器缓存可注释 expires 12h;
- location /admin
- {
- proxy_pass http://www.baidu.com;
- proxy_set_header Host www.baidu.com;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header REMOTE-HOST $remote_addr;
-
- add_header X-Cache $upstream_cache_status;
-
- #Set Nginx Cache
-
- add_header Cache-Control no-cache;
- expires 12h;
- }
复制代码 |