nginx 反向代理
实现反向代理,访问a,到达b
server {
listen 80;
server_name user.looaon.com;
location / {
proxy_set_header Accept-Encoding '';
proxy_set_header Host $host:$server_port;
proxy_pass http://117.160.132.162:666/;
}
}
参考2
server {
listen 80;
server_name www.example.com; # 改为第一步申请的域名
location / {
proxy_pass http://127.0.0.1:5050;
}
}