[GH-ISSUE #4436] 问题: 设置Subdomain使用上遇到了问题 #3503

Closed
opened 2026-05-05 14:15:02 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @AL-Pinecore on GitHub (Sep 13, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4436

Bug Description

我尝试设置自定义二级域名服务用来访问内网服务器的多个http服务,但是我配置完成在浏览器进入其中一个二级域名的时候,浏览器告诉我该网页无法正常运作(Error Code 503),DNS解析是 *.domain.cn 内容:(frps服务器公网ip)

frpc Version

0.60.0

frps Version

0.60.0

System Architecture

frps:Debian11, frpc:Ubuntu20.04.06

Configurations

(frps)
bindAddr = "0.0.0.0"
bindPort = 13052

auth.method = "token"
auth.token = "token"

webServer.addr = "0.0.0.0"
webServer.port = 23679
webServer.user = "user"
webServer.password = "pwd"

#tls
#transport.tls.force = true
#transport.tls.certFile = "/etc/frp/ssl/server.crt"
#transport.tls.keyFile = "/etc/frp/ssl/server.key"
#transport.tls.trustedCaFile = "/etc/frp/ssl/ca.crt"

subdomainHost = "domain.cn"
vhostHTTPSPort = 6001
vhostHTTPPort = 6002

(frpc)
serverAddr = "serverIP"
serverPort = 13052

auth.method = "token"
auth.token = "token"

webServer.addr = "0.0.0.0"
webServer.port = 23679
webServer.user = "user"
webServer.password = "pwd"
webServer.pprofEnable = false

#tls
#transport.tls.certFile = "/etc/frp/ssl/client.crt"
#transport.tls.keyFile = "/etc/frp/ssl/client.key"
#transport.tls.trustedCaFile = "/etc/frp/ssl/ca.crt"

proxies
name = "a"
type = "http"
localPort = 12805
subdomain = "a"

proxies
name = "b"
type = "http"
localPort = 23333
subdomain = "b"

proxies
name = "c"
type = "tcp"
localPort = 47382
remotePort = 31798

Logs

No response

Steps to reproduce

  1. 配置好以上配置文件
  2. 设置DNS解析至 *.domain.cn ,内容 是frps所在的公网服务器的ip
  3. 访问 a.domain.cn
  4. 浏览器显示该网页无法正常运作,Error Code 503

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @AL-Pinecore on GitHub (Sep 13, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4436 ### Bug Description 我尝试设置自定义二级域名服务用来访问内网服务器的多个http服务,但是我配置完成在浏览器进入其中一个二级域名的时候,浏览器告诉我该网页无法正常运作(Error Code 503),DNS解析是 *.domain.cn 内容:(frps服务器公网ip) ### frpc Version 0.60.0 ### frps Version 0.60.0 ### System Architecture frps:Debian11, frpc:Ubuntu20.04.06 ### Configurations (frps) bindAddr = "0.0.0.0" bindPort = 13052 auth.method = "token" auth.token = "token" webServer.addr = "0.0.0.0" webServer.port = 23679 webServer.user = "user" webServer.password = "pwd" #tls #transport.tls.force = true #transport.tls.certFile = "/etc/frp/ssl/server.crt" #transport.tls.keyFile = "/etc/frp/ssl/server.key" #transport.tls.trustedCaFile = "/etc/frp/ssl/ca.crt" subdomainHost = "domain.cn" vhostHTTPSPort = 6001 vhostHTTPPort = 6002 (frpc) serverAddr = "serverIP" serverPort = 13052 auth.method = "token" auth.token = "token" webServer.addr = "0.0.0.0" webServer.port = 23679 webServer.user = "user" webServer.password = "pwd" webServer.pprofEnable = false #tls #transport.tls.certFile = "/etc/frp/ssl/client.crt" #transport.tls.keyFile = "/etc/frp/ssl/client.key" #transport.tls.trustedCaFile = "/etc/frp/ssl/ca.crt" [[proxies]] name = "a" type = "http" localPort = 12805 subdomain = "a" [[proxies]] name = "b" type = "http" localPort = 23333 subdomain = "b" [[proxies]] name = "c" type = "tcp" localPort = 47382 remotePort = 31798 ### Logs _No response_ ### Steps to reproduce 1. 配置好以上配置文件 2. 设置DNS解析至 *.domain.cn ,内容 是frps所在的公网服务器的ip 3. 访问 a.domain.cn 4. 浏览器显示该网页无法正常运作,Error Code 503 ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@xqzr commented on GitHub (Sep 13, 2024):

似乎没有命中 frps。
尝试访问 http://a.domain.cn:6002

<!-- gh-comment-id:2349416021 --> @xqzr commented on GitHub (Sep 13, 2024): 似乎没有命中 frps。 尝试访问 http://a.domain.cn:6002
Author
Owner

@AL-Pinecore commented on GitHub (Sep 13, 2024):

似乎没有命中 frps。

尝试访问 http://a.domain.cn:6002

我试了一下,似乎不行

<!-- gh-comment-id:2349687273 --> @AL-Pinecore commented on GitHub (Sep 13, 2024): > 似乎没有命中 frps。 > > 尝试访问 http://a.domain.cn:6002 我试了一下,似乎不行
Author
Owner

@AL-Pinecore commented on GitHub (Sep 13, 2024):

如果直接通过ip+端口访问的话,弹出来了个页面:

The page you requested was 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.

<!-- gh-comment-id:2349693784 --> @AL-Pinecore commented on GitHub (Sep 13, 2024): 如果直接通过ip+端口访问的话,弹出来了个页面: The page you requested was 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.
Author
Owner

@AL-Pinecore commented on GitHub (Sep 14, 2024):

现在访问a.domain.cn,浏览器告诉我ERR_CONNECTION_REFUSED

<!-- gh-comment-id:2350817102 --> @AL-Pinecore commented on GitHub (Sep 14, 2024): 现在访问a.domain.cn,浏览器告诉我ERR_CONNECTION_REFUSED
Author
Owner

@AL-Pinecore commented on GitHub (Sep 14, 2024):

解决了,把vhostHTTPPort改成80就没事了

<!-- gh-comment-id:2350832881 --> @AL-Pinecore commented on GitHub (Sep 14, 2024): 解决了,把vhostHTTPPort改成80就没事了
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#3503
No description provided.