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.
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 服务,填写的配置。请各位帮帮忙。衷心感谢。
问题已解决,防火墙没开。
我也遇到这个问题,但防火墙确认开了,还有可能是什么原因呢?
你按照官网上配制一遍,打开防火墙,应该没问题。win上的配置用notepad++比较好。
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运行也成功了,浏览器访问就打不开页面,没有防火墙问题,请问还有什么原因吗?
有没有做端口转发? 肖黎东‖Sean 职业:VFX特效师 Email:[email protected] 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.
比如外网域名到frps机器上,用nginx转发到8080,frps通过8080和frpc通信,frpc机器用80端口 肖黎东‖Sean 职业:VFX特效师 Email:[email protected] TEL:+86 13066200549 Address:广东省江门市五邑大学 Postal Code:529020 QQ:204606460 Summary:后期特效师 视觉艺术家 https://seandemo2017.wixsite.com/website 签名由 网易邮箱大师 定制 在2018年07月13日 23:55,肖黎东(守护星) 写道: 有没有做端口转发? 肖黎东‖Sean 职业:VFX特效师 Email:[email protected] 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.
你好,你的意思是我要在frps服务器端使用nginx转发frpc的ip:port吗?
你好,我是这样实现的,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写道:
你好,你的意思是我要在frps服务器端使用nginx转发frpc的ip:port吗?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fatedier/frp/issues/782#issuecomment-405010935, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AeEQHbR4kKwVyWWhDy2zXunLwokLnwx_ks5uGbffgaJpZM4UF_Vz
.
你说的“dns服务器转发”,还要先搞个域名吗?不是可以自定义任意的域名吗?
你没有域名怎么定向到frps服务器,只能用ip吧 肖黎东‖Sean 职业:VFX特效师 Email:[email protected] 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.
用ip是没问题,就是用自定义域名不行,那还是搞个域名了,谢谢了。
是的,域名只是指向你那个ip,nginx获取该域名空间
Vickey Wu notifications@github.com 于 2018年7月15日周日 下午12:16写道:
用ip是没问题,就是用自定义域名不行,那还是搞个域名了,谢谢了。
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fatedier/frp/issues/782#issuecomment-405066144, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AeEQHQrkbN3PSEDWrVDMAHOoUm2cQfJsks5uGsIOgaJpZM4UF_Vz
.
@Vickey-Wu 请问你解决了吗?我也是用ip可以,用自定义域名不行
同样是frp监听非80端口,nginx配置转发
域名:端口可以访问
子域名无法访问
@Thyiad 我后来没用域名,只是用ip
@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
@Vickey-Wu @Thyiad
域名只能通过端口访问的话,nginx可以这样配置
server {
listen 80;
server_name frp.your.com;
location / {
proxy_pass http://frp.your.com:8080;
}
}
我使用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
[common]
bind_port = 7000
vhost_http_port = 8080
server {
listen 80;
server_name frp.3to.top;
location / {
# proxy_pass http://127.0.0.1:8080;
# 代理到127.0.0.1:8080可以通过frp.3to.top:8080,但是frp.3to.top还是访问不到,所以改为下面配置
proxy_pass http://frp.3to.top:8080;
}
}
[common]
server_addr = 182.254.232.213
server_port = 7000
[web]
type = http
local_port = 10086
custom_domains = frp.3to.top
我使用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)
[common] bind_port = 7000 vhost_http_port = 8080服务端(nginx)
server { listen 80; server_name frp.3to.top; location / { # proxy_pass http://127.0.0.1:8080; # 代理到127.0.0.1:8080可以通过frp.3to.top:8080,但是frp.3to.top还是访问不到,所以改为下面配置 proxy_pass http://frp.3to.top:8080; } }客户端(frpc)
[common] server_addr = 182.254.232.213 server_port = 7000 [web] type = http local_port = 10086 custom_domains = frp.3to.top
赞一个,参考你这个答案,成功访问了本地flask项目,感谢~
我使用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)
[common] bind_port = 7000 vhost_http_port = 8080服务端(nginx)
server { listen 80; server_name frp.3to.top; location / { # proxy_pass http://127.0.0.1:8080; # 代理到127.0.0.1:8080可以通过frp.3to.top:8080,但是frp.3to.top还是访问不到,所以改为下面配置 proxy_pass http://frp.3to.top:8080; } }客户端(frpc)
[common] server_addr = 182.254.232.213 server_port = 7000 [web] type = http local_port = 10086 custom_domains = frp.3to.top
非常感谢,原来是需要在NGINX中配置PASS掉 需要穿透的域名。
我使用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)
[common] bind_port = 7000 vhost_http_port = 8080服务端(nginx)
server { listen 80; server_name frp.3to.top; location / { # proxy_pass http://127.0.0.1:8080; # 代理到127.0.0.1:8080可以通过frp.3to.top:8080,但是frp.3to.top还是访问不到,所以改为下面配置 proxy_pass http://frp.3to.top:8080; } }客户端(frpc)
[common] server_addr = 182.254.232.213 server_port = 7000 [web] type = http local_port = 10086 custom_domains = frp.3to.top
既然用了Nginx代理,就可以不开放vhost_http_port这个端口了。frps填了这个属性启动后(假设vhost_http_port=8080),可以不用多开一个端口,在代理里面设置一下,就能直接代理到本地的localhost:8080。一定要加下面的配置setHeader
server {
listen 80;
server_name frp.3to.top;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
}
没以前好配置了
Most helpful comment
我使用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)