fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.32k stars 13.23k forks source link

问题: 设置Subdomain使用上遇到了问题 #4436

Closed AL-Pinecore closed 1 month ago

AL-Pinecore commented 1 month ago

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

xqzr commented 1 month ago

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

AL-Pinecore commented 1 month ago

似乎没有命中 frps。

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

我试了一下,似乎不行

AL-Pinecore commented 1 month ago

如果直接通过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.

AL-Pinecore commented 1 month ago

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

AL-Pinecore commented 1 month ago

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