[GH-ISSUE #1951] vhost配置cs均生效但是网页无法访问 #1553

Closed
opened 2026-05-05 12:59:02 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @HinxVietti on GitHub (Aug 21, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1951

有劳百忙中关注下; 尝试各种办法均未解决, 应该也不是理解错误的问题

相关配置:
Server:

绑定信息忽略
开启vhost代理
vhost_http_port = 80
vhost_https_port = 443
vhost_http_timeout = 60
subdomain_host = xxx.net
custom_404_page = ./404.html

Client:

绑定信息忽略
[website-test]
type = http
local_port = 80
locations = /,/wordpress
subdomain = www

域名服务器解析设置

xxx.net;
A: @xxx.net -->server ip
A: www.xxx.net -->server ip
A: blog.xxx.net -->server ip

测试结果:

xxx.net --> 404页
www.xxx.net -->未响应 500
blog.xxx.net --> 404页

后台结果
双端控制台都是绿灯;

个人理解:
服务端监听了80(http),然后客户端配置了subdomain 和服务端的subdomain-host组合成代理域名; 然后通过80端口和server的静态ip暴露出来;
多次测试frpClient的本地网站服务可以正常访问的, 尝试忽略frpServer的vhost方案, 改用tcp(80)去代理能够访问网站;
也翻阅frps-all 和 frpc-all, 没能找到合理的解释;
不知道是不是bug , 请告知;

浏览器:www.xxx.net-->服务器:-->DNS-->IP
IP-->FRPS->(frps-vhost-rules?)-->result;
所以配置下的发生的事情大致应该是

frps -> rev: www.xxx.net -> proxy -> www.xxx.net -> frpc (localhost:80) -> return ;

但是实际发生了

frps -> rev: www.xxx.net -> proxy -> www.xxx.net -> frpc ->??? -> return 500;
frps没有返回404证明找到了代理内容

可能我对frp-vhost的规则理解有点错误, 作为知识盲区, 很希望各方大佬能够指点盲区;
(业余, 但是很感兴趣的frp user)

)

Originally created by @HinxVietti on GitHub (Aug 21, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1951 有劳百忙中关注下; 尝试各种办法均未解决, 应该也不是理解错误的问题 相关配置: Server: > 绑定信息忽略 > 开启vhost代理 > vhost_http_port = 80 > vhost_https_port = 443 > vhost_http_timeout = 60 > subdomain_host = xxx.net > custom_404_page = ./404.html Client: > 绑定信息忽略 > [website-test] > type = http > local_port = 80 > locations = /,/wordpress > subdomain = www 域名服务器解析设置 > xxx.net; > A: @xxx.net -->server ip > A: www.xxx.net -->server ip > A: blog.xxx.net -->server ip 测试结果: > xxx.net --> 404页 > www.xxx.net -->未响应 500 > blog.xxx.net --> 404页 后台结果 双端控制台都是绿灯; 个人理解: 服务端监听了80(http),然后客户端配置了subdomain 和服务端的subdomain-host组合成代理域名; 然后通过80端口和server的静态ip暴露出来; 多次测试frpClient的本地网站服务可以正常访问的, 尝试忽略frpServer的vhost方案, 改用tcp(80)去代理能够访问网站; 也翻阅frps-all 和 frpc-all, 没能找到合理的解释; 不知道是不是bug , 请告知; 浏览器:www.xxx.net-->服务器:-->DNS-->IP IP-->FRPS->(frps-vhost-rules?)-->result; 所以配置下的发生的事情大致应该是 > frps -> rev: www.xxx.net -> proxy -> www.xxx.net -> frpc (localhost:80) -> return ; 但是实际发生了 > frps -> rev: www.xxx.net -> proxy -> www.xxx.net -> frpc ->??? -> return 500; > frps没有返回404证明找到了代理内容 可能我对frp-vhost的规则理解有点错误, 作为知识盲区, 很希望各方大佬能够指点盲区; (业余, 但是很感兴趣的frp user) : )
Author
Owner

@Becods commented on GitHub (Aug 21, 2020):

请检查后端服务器是否运行正常,是否正确配置vhost
我指的是被frpc所代理的,运行在80端口的程序

<!-- gh-comment-id:678132028 --> @Becods commented on GitHub (Aug 21, 2020): 请检查后端服务器是否运行正常,是否正确配置vhost 我指的是被frpc所代理的,运行在80端口的程序
Author
Owner

@HinxVietti commented on GitHub (Aug 21, 2020):

请检查后端服务器是否运行正常,是否正确配置vhost
我指的是被frpc所代理的,运行在80端口的程序

谢谢, 我检查过阿帕奇了,确认vhost正常运行的, 且本机127.0.0.1 / localhost可以正常访问; 暂时没发现被frpc代理的服务器有什么问题.

<!-- gh-comment-id:678167014 --> @HinxVietti commented on GitHub (Aug 21, 2020): > 请检查后端服务器是否运行正常,是否正确配置vhost > 我指的是被frpc所代理的,运行在80端口的程序 谢谢, 我检查过阿帕奇了,确认vhost正常运行的, 且本机127.0.0.1 / localhost可以正常访问; 暂时没发现被frpc代理的服务器有什么问题.
Author
Owner

@HinxVietti commented on GitHub (Sep 2, 2020):

暂时放弃frp vhost了, 由于log查不出什么原因, 现在直接转发tcp80/443所有内容, 使用内置的Apache处理.

<!-- gh-comment-id:685369071 --> @HinxVietti commented on GitHub (Sep 2, 2020): 暂时放弃frp vhost了, 由于log查不出什么原因, 现在直接转发tcp80/443所有内容, 使用内置的Apache处理.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1553
No description provided.