mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #161] 配置内网的web服务器无法访问。 #105
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#105
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 @severloh on GitHub (Nov 16, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/161
web服务器是windows10 系统 配置 信息如下
frpc.ini
[common]
server_addr = 123.56.251.141
server_port = 5443
auth_token = 123
[web]
type = http
local_port = 8080
frps.ini
公网服务器配置是
[common]
bind_port = 5443
vhost_http_port = 6000
[web]
type = http
custom_domains = www.lpf710282897.com
auth_token = 123
www.lpf710282897.com:6000 访问失败 大家是怎么配置的呢? 我是新手,端口都是打开的,内网启动后显示的ProxyName [web], connect to server[123.56.251.141:5443] success!
@nishuihanlong commented on GitHub (Nov 16, 2016):
首先你要开放这几个端口
其次你配置域名解析到123.56.251.141
最后你web开放端口是8080,所以访问也是
@severloh commented on GitHub (Nov 16, 2016):
你好,我公网服务器123.56.251.141 这几个端口都是打开的,内网服务器的8080端口也是打开的状态,如果直接访问不使用域名 123.56.251.141:6000 8080 或者 123.56.251.141:6000 也不行 frps.log
2016/11/16 16:39:06 [control.go:152] [W] ProxyName [web], read error: read tcp 123.56.251.141:5443->222.182.57.230:58547: read: connection reset by peer
2016/11/16 16:39:06 [control.go:146] [W] ProxyName [web], client is dead!
2016/11/16 16:39:06 [control.go:111] [I] ProxyName [web], I'm dead!
2016/11/16 16:39:06 [server.go:159] [I] ProxyName [web], listener is closed
2016/11/16 16:39:18 [control.go:314] [I] ProxyName [web], start proxy success
是因为公网服务器rfps 数据发送到内网 应用rfpc过程中被拒绝了吗?
@fatedier commented on GitHub (Nov 16, 2016):
custom_domains = www.lpf710282897.comcustom_domains 设置了域名,不能通过 ip 访问的,你的域名解析到了 123.56.251.141 吗?
@severloh commented on GitHub (Nov 17, 2016):
感谢回答,是我的域名没有解析到服务器ip上。那如果在无域名的情况下,实现内网web服务器的部署
client: win10 x64
frpc.ini
[common]
server_addr = 123.56.251.141
server_port = 5443
auth_token = 123
log_file = D:/frp/frpc.log
log_level = debug
log_max_days = 3
[ssh]
type = tcp
local_port = 8080
use_encryption = true
use_gzip = true
pool_count = 10
frps.ini
[common]
bind_port = 5443
dashboard_port = 6443
log_file = /usr/local/frps/frps.log
log_level = info
log_max_days = 3
max_pool_count = 50
[ssh]
type = tcp
listen_port = 6000
auth_token = 123
use_encryption = true
use_gzip = true
我本地有一个服务http://localhost:8080/MVNFHM/可以访问,公网服务器用http://123.56.251.141:6000/MVNFHM/做映射也无法访问是因为我的配置错误吗?
@fatedier commented on GitHub (Nov 17, 2016):
看起来没错,能提供日志吗?
@severloh commented on GitHub (Nov 18, 2016):
客户端日志
2016/11/18 13:22:54 [main.go:109] [I] Start frpc success
2016/11/18 13:22:54 [control.go:172] [D] ProxyName [ssh], read [{"type":3,"code":0,"msg":""}
]
2016/11/18 13:22:54 [control.go:185] [I] ProxyName [ssh], connect to server [123.56.251.141:5443] success!
2016/11/18 13:22:54 [control.go:193] [I] Start to send heartbeat to frps
2016/11/18 13:23:14 [control.go:197] [D] Send heartbeat to server
2016/11/18 13:23:14 [control.go:101] [D] ProxyName [ssh], receive heartbeat response
2016/11/18 13:23:34 [control.go:197] [D] Send heartbeat to server
2016/11/18 13:23:34 [control.go:101] [D] ProxyName [ssh], receive heartbeat response
2016/11/18 13:23:54 [control.go:197] [D] Send heartbeat to server
2016/11/18 13:23:54 [control.go:101] [D] ProxyName [ssh], receive heartbeat response
服务端日志
2016/11/18 13:22:43 [main.go:182] [I] Start frps success
2016/11/18 13:22:54 [control.go:314] [I] ProxyName [ssh], start proxy success
服务端端口打开情况
[root@iZ25avbbe97Z ~]# firewall-cmd --zone=public --list-ports
6443/tcp 5443/tcp 80/tcp 81/tcp 443/tcp 8089/tcp 9000/tcp 6000/tcp
http://123.56.251.141:6000/MVNFHM/访问后日志好像没有变化啊
如果换成http://123.56.251.141:5443/MVNFHM/
服务端日志
2016/11/18 13:30:29 [control.go:67] [W] Parse msg from frpc error: invalid character 'G' looking for beginning of value : GET / HTTP/1.1
@fatedier commented on GitHub (Nov 28, 2016):
@YanceyShi commented on GitHub (May 25, 2018):
按照上面的配置没有域名的,提示:
The webpage at http://xxxxxxxxxx:xxxx/ might be temporarily down or it may have moved permanently to a new web address.
@leaguecn commented on GitHub (May 18, 2019):
1 我的问题:FRP服务端frps、客户端frpc运行正常,为何还是无法访问web服务:http://xyz.example.com:8080/?
2 配置文件
服务端配置文件
[common]
bind_port = 7000
token = admin
authentication_timeout = 3900
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin
vhost_http_port = 8080
vhost_https_port = 10443
subdomain_host = example.com
客户端配置文件
[common]
server_addr = X.X.X.X
server_port = 7000
token = admin
[web]
type = http
local_port = 80
use_encryption = true
use_compression = true
subdomain = xyz
3 日志文件
位于服务器端的日志:
2019/05/18 09:17:00 [I] [service.go:139] frps tcp listen on 0.0.0.0:7000
2019/05/18 09:17:00 [I] [service.go:181] http service listen on 0.0.0.0:8080
2019/05/18 09:17:00 [I] [service.go:202] https service listen on 0.0.0.0:10443
2019/05/18 09:17:00 [I] [service.go:232] Dashboard listen on 0.0.0.0:7500
2019/05/18 09:17:00 [I] [root.go:204] Start frps success
75002019/05/18 09:17:22 [I] [dashboard_api.go:65] Http request: [/api/serverinfo]
2019/05/18 09:17:22 [I] [dashboard_api.go:58] Http response [/api/serverinfo]: code [200]
2019/05/18 09:17:30 [I] [service.go:340] client login info: ip [211.70.208.11:37206] version [0.27.0] hostname [] os [linux] arch [amd64]
2019/05/18 09:17:31 [I] [http.go:90] [83892ab3a3c49a9b] [web] http proxy listen for host [xyz.example.com] location []
2019/05/18 09:17:31 [I] [control.go:398] [83892ab3a3c49a9b] new proxy [web] success 2019/05/18 09:18:24 [I] [dashboard_api.go:65] Http request: [/api/serverinfo]
2019/05/18 09:18:24 [I] [dashboard_api.go:58] Http response [/api/serverinfo]: code [200]
2019/05/18 09:18:25 [I] [dashboard_api.go:173] Http request: [/api/proxy/http]
2019/05/18 09:18:25 [I] [dashboard_api.go:167] Http response [/api/proxy/http]: code [200]
2019/05/18 09:18:27 [I] [dashboard_api.go:307] Http request: [/api/traffic/web]
2019/05/18 09:18:27 [I] [dashboard_api.go:301] Http response [/api/traffic/web]: code [200]
2019/05/18 09:23:26 [I] [dashboard_api.go:173] Http request: [/api/proxy/tcp]
2019/05/18 09:23:26 [I] [dashboard_api.go:167] Http response [/api/proxy/tcp]: code [200]
2019/05/18 09:23:27 [I] [dashboard_api.go:173] Http request: [/api/proxy/udp]
2019/05/18 09:23:27 [I] [dashboard_api.go:167] Http response [/api/proxy/udp]: code [200]
2019/05/18 09:23:28 [I] [dashboard_api.go:65] Http request: [/api/serverinfo]
2019/05/18 09:23:28 [I] [dashboard_api.go:58] Http response [/api/serverinfo]: code [200]
位于虚拟机上的客户端日志:
2019/05/18 09:17:31 [I] [service.go:221] login to server success, get run id [83892ab3a3c49a9b], server udp port [0]
2019/05/18 09:17:31 [I] [proxy_manager.go:137] [83892ab3a3c49a9b] proxy added: [web]
2019/05/18 09:17:31 [I] [control.go:144] [web] start proxy success
@sunshinebe commented on GitHub (Jun 19, 2019):
authentication_timeout = 3900 去掉这个东西应该就好了