frp实现多个https配置的问题

44次阅读

共计 1419 个字符,预计需要花费 4 分钟才能阅读完成。

场景:内网机器中搭建了 bitwarden 和 nextcloud 程序。

设想:
1:通过 frp https 穿透的形式 https://domain:443 访问 bitwarden  
2:通过 frp https 穿透的形式 https://domain:445 访问 nextcloud

tg 上有个老哥说使用 nginx,但是下去琢磨了一番。尝试了几次也没有成功。有大佬知道怎么配置吗?

网友回复:

注册 你用 frp tcp 模式,443 指向你内网 nginx 就行  在 nginx 上设置不同域名转发到不同的服务

hostloc10086 Frps 服务端一键配置脚本 https://github.com/MvsCode/frps-onekey 教程 https://www.yxtvs.com/2020/872.html FRP 和 Nginx 共用 80 端口  在 /etc/nginx/conf/nginx.conf 中 http{} 里添加以下参数 server {    listen 80;    server_name *.abc.xyz;    location / {     proxy_pass http://127.0.0.1:81;     proxy_redirect http://$host/ http://$http_host/;     proxy_set_header X-Real-IP $remote_addr;     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;     proxy_set_header Host $host;}  }

wey 泛域名,反代到 81 端口,按照 frp 内网域名走各自流量

Binance.com 你的意思是 frpc 上使用 http 的模式设置多个端口,然后在外网 frps 服务器上配置 nginx 吗?但是外网机器也监听不到内网的程序啊,内网没有 ip

Binance.com 内网可以设置域名解析吗?绑域名咋个绑

hostloc10086 你看下官方文档啊,内网域名不用解析,是通过泛域名通过反代端口识别,数据统一走 5443 端口到你家里的

hostloc10086 多域名 > server:443 >> local:443 > nginx 多域名

Binance.com 老哥解决了吗

Waylon 可以都使用 443 端口, 更方便的方法是配合泛域名: frp+dnsmasq+nginx+ 泛域名, 反代 https 参考,https://github.com/fatedier/frp/issues/671

注册 没搞泛域名,多配了个二级域名。一开始以为可以用通过一个二级域名配不同的端口实现,最后发现行不通

注册 解决了,可以通过泛域名解决,或者自己再多配一个二级域名。

hostloc10086 https 在 ngins 上配置,nginx 到 frp 走普通的 tcp

hostloc10086 我不知道咋弄  frp 访问本地 80 端口 显示拒绝访问

yanzhiling2002 这里有讲解文档还是比较详细的 https://github.com/fatedier/frp

新城旧梦 直接在内网 docker 搭一个 nginx-proxy-manager,一键 ssl 上泛域名 *.xxx.xxx frp-s tcp  外网服务器:443 –> 内网 frp- c 端口 –>nginx-proxy-manager 在 NPM 上配置内网端口访问 IP:端口 访问 bitworden 和 nextcloud 即可

正文完
 0