MENU

nginx 反向代理

July 24, 2018 • Read: 986 • 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;
        }
    }

兼总条贯 知至知终

最后编辑于: December 8, 2018