[GH-ISSUE #2482] https2http 子页面无法打开 #1969

Closed
opened 2026-05-05 13:16:10 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @crossgg on GitHub (Jul 14, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2482

OS:linux
Version:0.37
本地typecho的博客是http的,想用frp的 https2http
frpc.ini

[blog_https2]
type = https
subdomain = blog
plugin = https2http
plugin_local_addr = 127.0.0.1:90
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp
plugin_crt_path = ./cert/server.crt
plugin_key_path = ./cert/server.key

可以正常打开https://blog.xx.xx的网站
但是点击子页面转跳到 http://127.0.0.1/archives/61/的页面无法正常显示
不懂如何解决

Originally created by @crossgg on GitHub (Jul 14, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2482 OS:linux Version:0.37 本地typecho的博客是http的,想用frp的 https2http frpc.ini ``` [blog_https2] type = https subdomain = blog plugin = https2http plugin_local_addr = 127.0.0.1:90 plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp plugin_crt_path = ./cert/server.crt plugin_key_path = ./cert/server.key ``` 可以正常打开https://blog.xx.xx的网站 但是点击子页面转跳到 `http://127.0.0.1/archives/61/`的页面无法正常显示 不懂如何解决
Author
Owner

@z0ow commented on GitHub (Jul 14, 2021):

plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx

<!-- gh-comment-id:879655583 --> @z0ow commented on GitHub (Jul 14, 2021): plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx
Author
Owner

@crossgg commented on GitHub (Jul 14, 2021):

plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx

谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/
不知道是什么问题

<!-- gh-comment-id:879733037 --> @crossgg commented on GitHub (Jul 14, 2021): > plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx 谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/ 不知道是什么问题
Author
Owner

@z0ow commented on GitHub (Jul 14, 2021):

plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx

谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/
不知道是什么问题

没有测试过https2http,但是估计是rewrite的原因,可以考虑尝试 plugin_host_header_rewrite = https://blog.xx.xx

或者在frpc客户端的local_addr设备上的网页服务器重新做一个http强制转https的重定向,然后使用https2https

<!-- gh-comment-id:879802994 --> @z0ow commented on GitHub (Jul 14, 2021): > > plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx > > 谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/ > 不知道是什么问题 没有测试过https2http,但是估计是rewrite的原因,可以考虑尝试 plugin_host_header_rewrite = https://blog.xx.xx 或者在frpc客户端的local_addr设备上的网页服务器重新做一个http强制转https的重定向,然后使用https2https
Author
Owner

@crossgg commented on GitHub (Jul 14, 2021):

plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx

谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/
不知道是什么问题

没有测试过https2http,但是估计是rewrite的原因,可以考虑尝试 plugin_host_header_rewrite = https://blog.xx.xx

或者在frpc客户端的local_addr设备上的网页服务器重新做一个http强制转https的重定向,然后使用https2https

👌🏻谢谢作者

<!-- gh-comment-id:879837886 --> @crossgg commented on GitHub (Jul 14, 2021): > > > plugin_host_header_rewrite = 127.0.0.1 改成 plugin_host_header_rewrite = blog.xx.xx > > > > > > 谢谢指导,可以正常打开子页面了,但是子页面还是http://blog.xx.xx/archives/61/ > > 不知道是什么问题 > > 没有测试过https2http,但是估计是rewrite的原因,可以考虑尝试 plugin_host_header_rewrite = https://blog.xx.xx > > 或者在frpc客户端的local_addr设备上的网页服务器重新做一个http强制转https的重定向,然后使用https2https 👌🏻谢谢作者
Author
Owner

@netfun2000 commented on GitHub (Mar 15, 2023):

我也遇到类似问题。我是在给odoo做https2http:

[odoo_https2http]
type = https
plugin = https2http
plugin_local_addr = 127.0.0.1:8069
plugin_crt_path = /certs/odoo_public.crt
plugin_key_path = /certs/odoo.key
plugin_host_header_rewrite = odoo.xxxx.com
plugin_header_X-From-Where = frp
subdomain = erp

跳转子页面的时候,不自动转https而是http,例如访问:
https://odoo.xxxx.com,Odoo要跳转到子页面odoo.xxxx.com/web,而这时候,就变成了http://odoo.xxxx.com/web而不是https://odoo.xxx.com/web

<!-- gh-comment-id:1469209651 --> @netfun2000 commented on GitHub (Mar 15, 2023): 我也遇到类似问题。我是在给odoo做https2http: [odoo_https2http] type = https plugin = https2http plugin_local_addr = 127.0.0.1:8069 plugin_crt_path = /certs/odoo_public.crt plugin_key_path = /certs/odoo.key plugin_host_header_rewrite = odoo.xxxx.com plugin_header_X-From-Where = frp subdomain = erp 跳转子页面的时候,不自动转https而是http,例如访问: https://odoo.xxxx.com,Odoo要跳转到子页面odoo.xxxx.com/web,而这时候,就变成了http://odoo.xxxx.com/web而不是https://odoo.xxx.com/web
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1969
No description provided.