mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #3799] nginx代理客户端通过域名访问提示请求的资源[/static/]不可用 #3024
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3024
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xydfg on GitHub (Nov 25, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3799
Bug Description
在内网安装客户端之后,通过nginx配置代理,用域名访问,提示static静态资源不可用,或者在客户端配置tcp同样无法通过公网的ip访问内网客户端的管理页面
frpc Version
0.51.3
frps Version
0.51.3
System Architecture
linux/amd64
Configurations
在客户端已经配置了代理到内网管理页面的地址,但通过remote_addres这个地址无法访问
Logs
No response
Steps to reproduce
...
Affected area
@xqzr commented on GitHub (Nov 25, 2023):
提供 Ngx 配置
@xydfg commented on GitHub (Nov 26, 2023):
@xqzr commented on GitHub (Nov 26, 2023):
:6200/static/;@xydfg commented on GitHub (Nov 26, 2023):
还是不行用域名访问地址被重定向到static

@github-actions[bot] commented on GitHub (Dec 27, 2023):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
@lucienshawls commented on GitHub (Mar 19, 2024):
尝试对你的nginx配置进行修改,使得对
/static/xxx的请求被重写至/dfg/frps/static/xxx,然后被重写后的URL触发代理转发规则,使得/dfg/frps/后的uristatic/xxx被代理转发至dashboard.引发错误的主要原因是dashboard将
static的uri写死为绝对路径/static,即无论nginx配置如何,dashboard必定会尝试访问xxx.example.com/static,而此URL无法命中代理转发规则location /dfg/frps,nginx又没有配置location /static/,导致请求无法被代理到http://localhost:port/,就404了。进行此变更的唯一代价是,你不能配置
xxx.example.com/static网页了,因为请求会被转走。