mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #483] host_header_rewrite 有时候代理不到后端 #368
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#368
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 @tradzero on GitHub (Oct 17, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/483
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.13.0
What operating system and processor architecture are you using (
go env)?darwin amd64 macos 10.12.6
Configures you used:
frps.inifrpc.iniSteps to reproduce the issue:
1.开启frps及frpc
2.访问service.domains:8081
3.访问service.domains:8081/operator
Describe the results you received:
初次访问service.domains:8081时能正确请求host accesslog里host是正确为 client.host 当进入其他链接时 比如service.domains:8081/operator accesslog 显示的host 为service.domains 导致页面全部404
注: service.domains client.host 隐去真实地址
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)
@tradzero commented on GitHub (Oct 17, 2017):
另 我的域名是.win 结尾的 不知道有没有影响
@fatedier commented on GitHub (Oct 19, 2017):
.win 结尾没有影响。
目前 host 替换只对访问链接的第一个 http 请求生效,因为一般 Host 用于做路由,后续同一个连接的不同请求是不需要替换的。我目前的测试还没遇到这个问题。
@tradzero commented on GitHub (Oct 19, 2017):
@fatedier 对于http来说 请求不是连续的 你刷新 或者进入另外的url时 怎么保证是同一个连接? 如果只有第一个请求更改host 你刷新之后 就穿透到服务器根目录下了呀
@tradzero commented on GitHub (Oct 19, 2017):
@fatedier 可以这样复现 你使用同一个vhosts 然后在index页反复刷新 你就会发现一会是请求到正确到路由上 一会访问的是nginx/apache root下
@fatedier commented on GitHub (Oct 19, 2017):
可能表述不清,是对于每一个 TCP 连接的第一个 http 请求。
@fatedier commented on GitHub (Oct 19, 2017):
我后端使用 nginx,反复刷新,还是访问其他页面都没有异常。
@tradzero commented on GitHub (Oct 19, 2017):
@fatedier 我跟我朋友两个都试过 独立的服务器 独立的客户端 都会出现同样的问题 需要我提供什么来帮助你复现不
@fatedier commented on GitHub (Oct 20, 2017):
提供最简化,我可以本地构建环境的 nginx 的配置吧。
@tradzero commented on GitHub (Oct 27, 2017):
抱歉这段时间有点忙没办法回复
这是我的vhost配置
不过我怀疑这个问题跟nginx本身没有关系 因为我windows端用的是httpd的服务
@fatedier commented on GitHub (Oct 27, 2017):
我需要的就是能够稳定复现的环境,可以方便调试,或者你可以自己抓包分析一下,报文转发后哪里存在问题。
@fatedier commented on GitHub (Jan 17, 2018):
可以用 0.14.1 版本测试下。