ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

frp web去掉端口访问

2019-07-21 13:37:34  阅读:121  来源: 互联网

标签:web set cn 端口 server frp proxy local mealcome



代理后没有保留URL

   server {
        listen       80;
        server_name  *.local.mealcome.cn local.mealcome.cn;

        location / {
            proxy_pass http://127.0.0.1:6002;
        }
    }

http: proxy error: no such domain: 127.0.0.1 /webcenter/

代理后保留URL

   server {
        listen       80;
        server_name  *.local.mealcome.cn local.mealcome.cn;

        location / {
            proxy_pass http://127.0.0.1:6002;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Real-PORT $remote_port;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }

local.mealcome.cn /webcenter/

通过转发,这样就不要加端口号访问了

参考: https://github.com/fatedier/frp/issues/124



标签:web,set,cn,端口,server,frp,proxy,local,mealcome

专注分享技术,共同学习,共同进步。

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有