[GH-ISSUE #3490] 反代虚拟路径的配置模式 #2789

Closed
opened 2026-05-05 13:48:01 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @yh4922 on GitHub (Jun 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3490

Describe the feature request

这是我的配置文件

[common]
bind_port = 37000
vhost_http_port = 38080
token = xxxxxxxxxxxxxxxxxxxxxxxxx
custom_404_page = /frps/frp_0.47.0_linux_amd64/404.html
; log_file = /frps/frp_0.47.0_linux_amd64/log.txt

我可以通过 {device_id}.demo.com:38080 正常访问设备。但现在有一个小程序需要请求设备端的接口,由于设备的 ID 是动态的,小程序不支持这种方式。因此,我想通过 http://device.demo.com/{device_id} 的方式配置 Nginx 反向代理。虽然可以跳转到 FRP,但会出现 FRP 的 404 页面。我怀疑这是由于域名验证不匹配导致的。请问是否有办法支持这种方式?

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @yh4922 on GitHub (Jun 16, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3490 ### Describe the feature request 这是我的配置文件 ``` [common] bind_port = 37000 vhost_http_port = 38080 token = xxxxxxxxxxxxxxxxxxxxxxxxx custom_404_page = /frps/frp_0.47.0_linux_amd64/404.html ; log_file = /frps/frp_0.47.0_linux_amd64/log.txt ``` 我可以通过 {device_id}.demo.com:38080 正常访问设备。但现在有一个小程序需要请求设备端的接口,由于设备的 ID 是动态的,小程序不支持这种方式。因此,我想通过 http://device.demo.com/{device_id} 的方式配置 Nginx 反向代理。虽然可以跳转到 FRP,但会出现 FRP 的 404 页面。我怀疑这是由于域名验证不匹配导致的。请问是否有办法支持这种方式? ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:48:01 -06:00
Author
Owner

@fatedier commented on GitHub (Jun 16, 2023):

没有理解,可以查看日志排查问题

<!-- gh-comment-id:1594104831 --> @fatedier commented on GitHub (Jun 16, 2023): 没有理解,可以查看日志排查问题
Author
Owner

@github-actions[bot] commented on GitHub (Jul 17, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1637235721 --> @github-actions[bot] commented on GitHub (Jul 17, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2789
No description provided.