[GH-ISSUE #582] 如何配置多域名转发到单服务器? #452

Closed
opened 2026-05-05 12:17:22 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @BI7PRK on GitHub (Jan 1, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/582

Frp version: frpc -v 0.1.4.1 && frps -v 0.1.4.1

System: (ContOS 6.9)?

Configures from frpc:

server_addr = www.abc.com
server_port = 2548
[www01]
type = http
local_ip = 192.168.31.100
local_port = 80
remote_port = 80
use_encryption = false
use_compression = true
custom_domains = www.abc.com

[www02]
type = http
local_ip = 192.168.31.100
local_port = 80
remote_port = 80
use_encryption = false
use_compression = true
custom_domains = www.123.com

Steps to reproduce the issue:

  1. 本地服务器有多个网站,需要绑定不同的域名。
  2. 多个域名已经解析到 [FRPS_IP_ADDR ]
  3. Frpc.ini 设置(见上)

Describe the results you received:
frpc.log:
[www02] start error: custom domain [www.123.com] should not belong to subdomain_host [abc]

Describe the results you expected:
期望不同域名可以解析并到 frp 服务器,并转发到 本地(单台)服务器上。

Originally created by @BI7PRK on GitHub (Jan 1, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/582 Frp version: **frpc -v 0.1.4.1 && frps -v 0.1.4.1** System: **(`ContOS 6.9`)?** **Configures from frpc:** > server_addr = www.abc.com > server_port = 2548 > [www01] > type = http > local_ip = 192.168.31.100 > local_port = 80 > remote_port = 80 > use_encryption = false > use_compression = true > custom_domains = www.abc.com > > [www02] > type = http > local_ip = 192.168.31.100 > local_port = 80 > remote_port = 80 > use_encryption = false > use_compression = true > custom_domains = www.123.com **Steps to reproduce the issue:** 1. 本地服务器有多个网站,需要绑定不同的域名。 2. 多个域名已经解析到 [FRPS_IP_ADDR ] 3. Frpc.ini 设置(见上) **Describe the results you received:** frpc.log: [www02] start error: custom domain [www.123.com] should not belong to subdomain_host [abc] **Describe the results you expected:** 期望不同域名可以解析并到 frp 服务器,并转发到 本地(单台)服务器上。
Author
Owner

@nanquanyuhao commented on GitHub (Aug 20, 2022):

@BI7PRK 可以的,服务端不要开启subdomain,客户端如下:

[web-test1]
type = http
local_ip = 127.0.0.1
local_port = 80
#subdomain = test
custom_domains = *.jsbnb.top
<!-- gh-comment-id:1221314313 --> @nanquanyuhao commented on GitHub (Aug 20, 2022): @BI7PRK 可以的,服务端不要开启subdomain,客户端如下: ``` [web-test1] type = http local_ip = 127.0.0.1 local_port = 80 #subdomain = test custom_domains = *.jsbnb.top ```
Author
Owner

@kingchaoliang commented on GitHub (Mar 14, 2023):

我目前只能通过通过frp反向代理设置,然后openwrt里面的frps 设置对应域名的设置。

<!-- gh-comment-id:1467774679 --> @kingchaoliang commented on GitHub (Mar 14, 2023): 我目前只能通过通过frp反向代理设置,然后openwrt里面的frps 设置对应域名的设置。
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#452
No description provided.