本帖最后由 fictioner 于 2020-4-16 16:37 编辑
- #PROXY-START/test
- location /test
- {
- proxy_pass http://zt.m.com:8000/test;
- proxy_set_header Host zt.m.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;
- }
- #PROXY-END/test
复制代码 测试成功了,都得加上子目录,而刚好我需要这样的结果。谢谢你的热心。
|