Nginx 转发到 traefik 的局域网服务器上
2019-09-30 本文已影响0人
思考蛙
某应用服务遇到的问题记录:
Nginx所在的入口服务器配置为
server {
listen 80;
server_name video.xxx.cn;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8083/video;
}
location ~ .*\.(js|css)$ {
proxy_pass http://127.0.0.1:8083;
}
}
Traefik 服务器配置
需要增加入口端口,然后配置服务转发