1
Te11UA 2020-08-20 14:33:28 +08:00
```
server { listen 80; server_name example.com; location /user/ { proxy_pass http://backend1/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #其他路径默认访问前台网站 location /admin/ { proxy_pass http://backend2; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` |
2
xiaojianbang OP @Te11UA 感谢感谢,我这就去试试
|
3
lower 2020-08-20 14:39:36 +08:00
1 楼正解,但是假如系统中有涉及到 用域名调用 /请求 /回调的接口地址,都得相应处理
|