[GH-ISSUE #337] 如何方便处理大量域名? #245

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

Originally created by @HappyHam on GitHub (May 26, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/337

当域名比较多时,在 c 端增删非常麻烦,有没有类似 default的参数,没有指定 custom_domains 的就都扔某个端口让web服务器去处理它们,就方便了。

Originally created by @HappyHam on GitHub (May 26, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/337 当域名比较多时,在 c 端增删非常麻烦,有没有类似 default的参数,没有指定 custom_domains 的就都扔某个端口让web服务器去处理它们,就方便了。
Author
Owner

@zhfish commented on GitHub (May 28, 2017):

特权模式,泛解析

<!-- gh-comment-id:304486422 --> @zhfish commented on GitHub (May 28, 2017): 特权模式,泛解析
Author
Owner

@HappyHam commented on GitHub (May 28, 2017):

泛解析仍然是解析的一个域名的子域名而已啊,不是多个域名。

<!-- gh-comment-id:304488881 --> @HappyHam commented on GitHub (May 28, 2017): 泛解析仍然是解析的一个域名的子域名而已啊,不是多个域名。
Author
Owner

@yi commented on GitHub (Jun 12, 2017):

把 frp 完全当通道用
公网服务器nginx做一套虚拟主机,全部转发给 frps
本地同样nginx 做一套虚拟主机,处理 frpc 发过来的请求
done

<!-- gh-comment-id:307872473 --> @yi commented on GitHub (Jun 12, 2017): 把 frp 完全当通道用 公网服务器nginx做一套虚拟主机,全部转发给 frps 本地同样nginx 做一套虚拟主机,处理 frpc 发过来的请求 done
Author
Owner

@36bian commented on GitHub (Nov 5, 2018):

服务器不需要安装nginx,直接在frps.ini中配置:

[common]
bind_port = 7000
vhost_http_port = 80

客户端frpc.ini中配置:

[common]
server_addr = 服务器ip
server_port = 7000

[web]
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = *.example.com

剩下的配置客户端nginx解析就可以了。但是不支持https

<!-- gh-comment-id:435784225 --> @36bian commented on GitHub (Nov 5, 2018): 服务器不需要安装nginx,直接在frps.ini中配置: ```shell [common] bind_port = 7000 vhost_http_port = 80 ``` 客户端frpc.ini中配置: ```shell [common] server_addr = 服务器ip server_port = 7000 [web] type = http local_ip = 127.0.0.1 local_port = 80 custom_domains = *.example.com ``` 剩下的配置客户端nginx解析就可以了。但是不支持https
Author
Owner

@dick129418 commented on GitHub (Dec 5, 2018):

@36bian 大兄弟,我的0.16版本custom_domains = *.example.com为啥不行呢, 还是说这个是你猜测的

<!-- gh-comment-id:444349593 --> @dick129418 commented on GitHub (Dec 5, 2018): @36bian 大兄弟,我的0.16版本custom_domains = *.example.com为啥不行呢, 还是说这个是你猜测的
Author
Owner

@36bian commented on GitHub (Dec 5, 2018):

@36bian 大兄弟,我的0.16版本custom_domains = *.example.com为啥不行呢, 还是说这个是你猜测的

example.com 是示例域名,要改成自己的。

<!-- gh-comment-id:444350858 --> @36bian commented on GitHub (Dec 5, 2018): > @36bian 大兄弟,我的0.16版本custom_domains = *.example.com为啥不行呢, 还是说这个是你猜测的 example.com 是示例域名,要改成自己的。
Author
Owner

@dick129418 commented on GitHub (Dec 5, 2018):

@36bian 额,我不至于这么傻。。
我的这个只能

subdomain = git
custom_domains = xxx.xyz

custom_domains = git.xxx.xyz,貌似都不行

<!-- gh-comment-id:444354216 --> @dick129418 commented on GitHub (Dec 5, 2018): @36bian 额,我不至于这么傻。。 我的这个只能 ``` subdomain = git custom_domains = xxx.xyz ``` 连`custom_domains = git.xxx.xyz`,貌似都不行
Author
Owner

@dick129418 commented on GitHub (Dec 5, 2018):

frps 和 fprc 都启动成功后,通过 test.frps.com 就可以访问到内网的 web 服务。

需要注意的是如果 frps 配置了 subdomain_host,则 custom_domains 中不能是属于 subdomain_host 的子域名或者泛域名。

同一个 http 或 https 类型的代理中 custom_domains 和 subdomain 可以同时配置。

------------------》》》》》》》》》》》》
搞定了。看了首页说明,原来服务器端不能配置这个 subdomain_host

<!-- gh-comment-id:444355101 --> @dick129418 commented on GitHub (Dec 5, 2018): frps 和 fprc 都启动成功后,通过 test.frps.com 就可以访问到内网的 web 服务。 需要注意的是如果 frps 配置了 subdomain_host,则 custom_domains 中不能是属于 subdomain_host 的子域名或者泛域名。 同一个 http 或 https 类型的代理中 custom_domains 和 subdomain 可以同时配置。 ------------------》》》》》》》》》》》》 搞定了。看了首页说明,原来服务器端不能配置这个 subdomain_host
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#245
No description provided.