mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #3551] 客户端与服务端配置好并且连接正常,但打开一直是404 not found #2830
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#2830
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 @Lydds on GitHub (Jul 25, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3551
Bug Description
客户端与服务端配置好并且连接正常,但打开一直是404 not found nginx
局域网项目访问一切正常,客户端与服务器连接也正常。
尝试版本:511 510
frpc Version
511 510
frps Version
511 510
System Architecture
linux/adm64
Configurations
[common]
#本地客户端与服务器的连接地址
server_addr =1.1.1.1
#在服务器上配置的bind_port端口
server_port = 7000
#服务器上配置的token,要与服务器一致,不然连接不上服务器
#log文件位置,建议配置在与本文件同目录。
log_file = ./frpc.log
#log文件保存时间。
log_max_days = 1
#本地WEB管理地址,建议开启,便于在本地直接用web管理,分别为:访问地址,端口号,用户名,密码。
admin_addr = 192.168.1.100
admin_port = 8890
admin_user = admin
admin_pwd = admin
[http]
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains =abc.com
[ssl]
type = https
custom_domains =abc.com
plugin = https2http
plugin_local_addr = 127.0.0.1:80
HTTPS 证书相关的配置
plugin_crt_path = ./usr/local/frp/server.crt
plugin_key_path = ./usr/local/frp/sever.key
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp
Logs
No response
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (Jul 25, 2023):
#3541 重复 & 更新到 0.51.2 测试一下
@Lydds commented on GitHub (Jul 25, 2023):
好的,我试一下。这个弄了3天了。实在要无力了。文档也快要背下来了
@fatedier commented on GitHub (Jul 25, 2023):
404 not found nginx如果你的提示里有 nginx ,那可能不是一个问题,你需要查看你的服务是不是有什么限制,比如要求 http host 必须为指定的 host。@Lydds commented on GitHub (Jul 25, 2023):
您是指的服务端还是客户端呢?我客户端是运行的apache,vps啥也没有。
@fatedier commented on GitHub (Jul 25, 2023):
这是你自己问题里的描述,首先你要确定是谁返回了 404,这个请求有没有发到你的服务,你服务的日志有什么信息,你需要做一些基本的测试来判断是哪一层的问题。
@Lydds commented on GitHub (Jul 25, 2023):
客户端:
7月 25 22:58:27 root_server frpc[7879]: 2023/07/25 22:58:27 [I] [service.go:301] [07de59bbd5398387] login to server success, get run id [07de59bbd5398387]
7月 25 22:58:27 root_server frpc[7879]: 2023/07/25 22:58:27 [I] [proxy_manager.go:150] [07de59bbd5398387] proxy added: [_ssl]
7月 25 22:58:27 root_server frpc[7879]: 2023/07/25 22:58:27 [I] [service.go:163] admin server listen on 192.168.1.25:8890
7月 25 22:58:28 root_server frpc[7879]: 2023/07/25 22:58:28 [I] [control.go:172] [07de59bbd5398387] [_ssl] start proxy success
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [control.go:252] [07de59bbd5398387] control writer is closing
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [visitor_manager.go:77] [07de59bbd5398387] gracefully shutdown visitor manager
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [service.go:214] [07de59bbd5398387] try to reconnect to server...
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [service.go:301] [07de59bbd5398387] login to server success, get run id [07de59bbd5398387]
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [proxy_manager.go:150] [07de59bbd5398387] proxy added: [_ssl]
7月 25 22:59:35 root_server frpc[7879]: 2023/07/25 22:59:35 [I] [control.go:172] [07de59bbd5398387] [_ssl] start proxy success
服务端:
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [root.go:204] frps uses config file: /usr/local/frp/frps.ini
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [service.go:206] frps tcp listen on 0.0.0.0:7000
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [service.go:282] https service listen on 0.0.0.0:4430
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [service.go:318] Dashboard listen on 0.0.0.0:7500
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [root.go:213] frps started successfully
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [service.go:539] [07de59bbd5398387] client login info: ip [316.157.227.239:59596] version [0.51.2] hostna>
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [https.go:67] [07de59bbd5398387] [_ssl] https proxy listen for host [abc.com]
Jul 25 22:59:35 VPS0274052606 frps[1092]: 2023/07/25 22:59:35 [I] [control.go:497] [07de59bbd5398387] new proxy [_ssl] type [https] success
Jul 25 22:59:43 VPS0274052606 frps[1092]: 2023/07/25 22:59:43 [I] [proxy.go:199] [07de59bbd5398387] [_ssl] get a user connection [43.207.160.222:45446]
Jul 25 22:59:43 VPS0274052606 frps[1092]: 2023/07/25 22:59:43 [I] [proxy.go:199] [07de59bbd5398387] [_ssl] get a user connection [43.207.160.222:7367]