mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #782] 通过frp穿透内网web服务失败。frp服务端提示:http: proxy error: no such domain, #611
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#611
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 @AllstarVirgo on GitHub (May 20, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/782
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.19.0
What operating system and processor architecture are you using (
go env)?服务端:centos 7
客户端: windows 10
Configures you used:
客户端
[common]
server_addr = 139.199.87.90
server_port = 7000
[web]type = http local_port = 8081 custom_domains = http://www.zhengcehuixiang.cn
=================================================================
服务端
bind_port = 7000
vhost_http_port = 8181
Steps to reproduce the issue:
1.在centos 7配置服务端文件frps.ini
2.在win10 配置了客户端的配置文件frpc.ini,开启本地web服务,端口为8081。该服务用Spring Boot开发。
3.frp的服务端和客户端显示连接成功,在本地可以访问web服务。
Describe the results you received:
通过 http://www.zhengcehuixiang.cn:8181/user 访问报错,The page you visit not found.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
The server is powered by frp.
Faithfully yours, frp.
frp服务端提示:
2018/05/20 11:29:42 [W] [newhttp.go:190] http: proxy error: no such domain
2018/05/20 11:29:42 [W] [newhttp.go:190] http: proxy error: no such domain
2018/05/20 11:33:56 [W] [newhttp.go:190] http: proxy error: no such domain
Describe the results you expected:
在web上显示字符串,hello,world。在本地通过localhost:8081/user是可以实现的。
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)
我推测是配置文件没有填对,我是对着frp的官网文档,通过自定义域名访问部署于内网的 web 服务,填写的配置。请各位帮帮忙。衷心感谢。
@AllstarVirgo commented on GitHub (May 21, 2018):
问题已解决,防火墙没开。
@rickycm commented on GitHub (Jun 8, 2018):
我也遇到这个问题,但防火墙确认开了,还有可能是什么原因呢?
@AllstarVirgo commented on GitHub (Jun 21, 2018):
你按照官网上配制一遍,打开防火墙,应该没问题。win上的配置用notepad++比较好。
@Vickey-Wu commented on GitHub (Jul 13, 2018):
frpc.ini
frps.ini
大家好,我配置了server 和 client运行也成功了,浏览器访问就打不开页面,没有防火墙问题,请问还有什么原因吗?
@SeanDemo2017 commented on GitHub (Jul 13, 2018):
有没有做端口转发? 肖黎东‖Sean 职业:VFX特效师 Email:xiao940213@gmail.com TEL:+86 13066200549 Address:广东省江门市五邑大学 Postal Code:529020 QQ:204606460 Summary:后期特效师 视觉艺术家 https://seandemo2017.wixsite.com/website 签名由 网易邮箱大师 定制 在2018年07月13日 16:23,Vickey Wu 写道: frpc.ini [common]
server_addr = aliyunserver
server_port = 7000
[web]
type = http
local_port = 80
custom_domains = test.xxx.com
frps.ini [common]
bind_port = 7000
vhost_http_port = 8000
大家好,我配置了server 和 client运行也成功了,浏览器访问就打不开页面,没有防火墙问题,请问还有什么原因吗? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@SeanDemo2017 commented on GitHub (Jul 13, 2018):
比如外网域名到frps机器上,用nginx转发到8080,frps通过8080和frpc通信,frpc机器用80端口 肖黎东‖Sean 职业:VFX特效师 Email:xiao940213@gmail.com TEL:+86 13066200549 Address:广东省江门市五邑大学 Postal Code:529020 QQ:204606460 Summary:后期特效师 视觉艺术家 https://seandemo2017.wixsite.com/website 签名由 网易邮箱大师 定制 在2018年07月13日 23:55,肖黎东(守护星) 写道: 有没有做端口转发? 肖黎东‖Sean 职业:VFX特效师 Email:xiao940213@gmail.com TEL:+86 13066200549 Address:广东省江门市五邑大学 Postal Code:529020 QQ:204606460 Summary:后期特效师 视觉艺术家 https://seandemo2017.wixsite.com/website 签名由 网易邮箱大师 定制 在2018年07月13日 16:23,Vickey Wu 写道: frpc.ini [common]
server_addr = aliyunserver
server_port = 7000
[web]
type = http
local_port = 80
custom_domains = test.xxx.com
frps.ini [common]
bind_port = 7000
vhost_http_port = 8000
大家好,我配置了server 和 client运行也成功了,浏览器访问就打不开页面,没有防火墙问题,请问还有什么原因吗? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@Vickey-Wu commented on GitHub (Jul 14, 2018):
你好,你的意思是我要在frps服务器端使用nginx转发frpc的ip:port吗?
@SeanDemo2017 commented on GitHub (Jul 14, 2018):
你好,我是这样实现的,frps机器的nginx监听来自域名的80端口(dns服务器转发),直接反向代理到8080端口,接着frps的vhost_http_prot=8080(https同理);监听该端口。
frpc机器(内网)上,通过通信端口(比如我用7000)接受到的指令映射到8080,我再次用nginx监听8080把8080转发到我自己同名的域名空间,这样就可以了。当然frpc机器上你也可以直接使用80默认端口,nginx里vhost改下配置文件就可以,祝你成功
Vickey Wu notifications@github.com 于 2018年7月14日周六 下午5:20写道:
@Vickey-Wu commented on GitHub (Jul 15, 2018):
你说的“dns服务器转发”,还要先搞个域名吗?不是可以自定义任意的域名吗?
@SeanDemo2017 commented on GitHub (Jul 15, 2018):
你没有域名怎么定向到frps服务器,只能用ip吧 肖黎东‖Sean 职业:VFX特效师 Email:xiao940213@gmail.com TEL:+86 13066200549 Address:广东省江门市五邑大学 Postal Code:529020 QQ:204606460 Summary:后期特效师 视觉艺术家 https://www.seanvfx.com 签名由 网易邮箱大师 定制 在2018年07月15日 11:25,Vickey Wu 写道: 你说的“dns服务器转发”,还要先搞个域名吗?不是可以自定义任意的域名吗? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
@Vickey-Wu commented on GitHub (Jul 15, 2018):
用ip是没问题,就是用自定义域名不行,那还是搞个域名了,谢谢了。
@SeanDemo2017 commented on GitHub (Jul 15, 2018):
是的,域名只是指向你那个ip,nginx获取该域名空间
Vickey Wu notifications@github.com 于 2018年7月15日周日 下午12:16写道:
@Thyiad commented on GitHub (Dec 17, 2018):
@Vickey-Wu 请问你解决了吗?我也是用ip可以,用自定义域名不行
同样是frp监听非80端口,nginx配置转发
域名:端口可以访问
子域名无法访问
@Vickey-Wu commented on GitHub (Dec 18, 2018):
@Thyiad 我后来没用域名,只是用ip
@Thyiad commented on GitHub (Dec 18, 2018):
@Vickey-Wu 谢谢。
不过我的很奇怪,服务端日志显示已经连接了,但我用域名访问的时候就是会报错
2018/12/18 15:51:33 [I] [proxy.go:291] [d7423b01563af456] [web] http proxy listen for host [test.frp.xxx.com] location [] 2018/12/18 15:51:33 [I] [control.go:335] [d7423b01563af456] new proxy [web] success 2018/12/18 15:51:58 [W] [newhttp.go:209] http: proxy error: no such domain@Thyiad commented on GitHub (Dec 18, 2018):
是我对配置理解错误了,因为是配置的转发。所以访问的时候,还是需要加上后缀的端口的,比如我这里配置的是7701,client配置了两个域名,那么分别要这样访问:
test.frp.xx.com:7701
test2.frp.xx.com:7701
@Johnson-LYS commented on GitHub (Aug 15, 2019):
@Vickey-Wu @Thyiad
域名只能通过端口访问的话,nginx可以这样配置
server {
listen 80;
server_name frp.your.com;
}
@Johnson-LYS commented on GitHub (Aug 15, 2019):
我使用frp监听8080端口,映射到内网的10086端口,服务器端通过nginx将80端口转发到8080端口,刚开始nginx转发地址配置为
127.0.0.1:8080。访问http://frp.3to.top出现“The page you request not found”,然后访问http://frp.3to.top:8080可以正常访问。之后修改nginx转发地址为frp.3to.top:8080,可以通过frp.3to.top正常访问。配置如下:
域名
frp.3to.top服务端(frps)
服务端(nginx)
客户端(frpc)
@Samge0 commented on GitHub (Sep 5, 2019):
赞一个,参考你这个答案,成功访问了本地flask项目,感谢~
@NJCCJohnWatson commented on GitHub (Jan 23, 2020):
非常感谢,原来是需要在NGINX中配置PASS掉 需要穿透的域名。
@turingzz commented on GitHub (Mar 17, 2020):
既然用了Nginx代理,就可以不开放vhost_http_port这个端口了。frps填了这个属性启动后(假设vhost_http_port=8080),可以不用多开一个端口,在代理里面设置一下,就能直接代理到本地的localhost:8080。一定要加下面的配置setHeader
@wanglongbiao commented on GitHub (Mar 29, 2020):
没以前好配置了