sf1991's recent timeline updates
sf1991

sf1991

V2EX member #244158, joined on 2017-07-24 14:03:22 +08:00
sf1991's recent replies
我解决这个问题了:

[NGINX HTTPS and FRPS · Issue #610 · fatedier/frp]( https://github.com/fatedier/frp/issues/610)

[nginx https 转发 frps · Issue #671 · fatedier/frp]( https://github.com/fatedier/frp/issues/671)

你先参考这两个。

我的代理:

```
server {
listen 80;
listen 443 ssl http2;

ssl_certificate /usr/local/nginx/conf/ssl/x.xxx.cn.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/x.xxx.cn.key;

server_name x.xxx.cn;

location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#看来这里要写死域名才行啊
proxy_pass https://x.xxx.cn:8080;
}
}
```

我这是为了解决:80 的 http/https 代理到 8080 的 http/https 上去,为了实现隐藏 8080 端口,因为 frp 绑定不论 80 端口,被占用了,所以 frp 只能使用 8080,而我这个代理就是为了隐藏 8080。

tip: 如果只是 http 的代理很容易,但是当我是 https 时,一样的 nginx 代理配置,frp 就不行了,虽然还没有找到真正的问题,但以上 nginx 代理配置也解决了我目前的问题。更多参见:[反向代理 · web 开发最佳实践 · 看云]( https://www.kancloud.cn/xiak/web-dev-best-practice/708208) #https 时的代理
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5951 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 02:59 · PVG 10:59 · LAX 19:59 · JFK 22:59
♥ Do have faith in what you're doing.