标签:pre class 必须 data 反向代理 col top div real
location /admin/api { proxy_pass http://172.26.190.212:7001/api; proxy_set_header X_Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; } location /student/api { proxy_pass http://172.26.190.212:7002/api; proxy_set_header X_Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; } location /data/api { proxy_pass http://172.26.190.212:7003/api; proxy_set_header X_Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; }
在设置 nginx 多 location 子路径反向代理时,必须设置 proxy_pass 也为子路径,名字不必相同
标签:pre class 必须 data 反向代理 col top div real
原文地址:https://www.cnblogs.com/xwgli/p/12258282.html