[GH-ISSUE #2567] [vhost_http_port][vhost_https_port]如果这样配置 80,81,82是不生效,不知道为什么 #2042

Closed
opened 2026-05-05 13:19:07 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @luozongcong on GitHub (Sep 5, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2567

Bug Description

1、关于这参数配置可以配多个端口
[vhost_http_port] [vhost_https_port]最多只能配置2个端口

......

vhost_http_port= 80
vhost_https_port= 443

......

如果这样配置 80,81,82是不生效,不知道为什么

......

vhost_http_port= 80, 81, 82
vhost_https_port= 443

......

2、关于这参数配置可以配多个域名

......
custom_domains = 我的域名1.com
custom_domains = 我的域名2.com
......

或者

......
custom_domains = 我的域名1.com, 我的域名2.com
......

frpc Version

0.37.1

frps Version

0.37.1

System Architecture

linux/amd64 + windows/amd64

Configurations

....
vhost_http_port= 80, 81, 82
vhost_https_port= 443
....
custom_domains = 我的域名1.com
custom_domains = 我的域名2.com
....

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @luozongcong on GitHub (Sep 5, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2567 ### Bug Description 1、关于这参数配置可以配多个端口 [vhost_http_port] [vhost_https_port]最多只能配置2个端口 ``` ...... vhost_http_port= 80 vhost_https_port= 443 ...... ``` 如果这样配置 80,81,82是不生效,不知道为什么 ``` ...... vhost_http_port= 80, 81, 82 vhost_https_port= 443 ...... ``` 2、关于这参数配置可以配多个域名 ``` ...... custom_domains = 我的域名1.com custom_domains = 我的域名2.com ...... ``` 或者 ``` ...... custom_domains = 我的域名1.com, 我的域名2.com ...... ``` ### frpc Version 0.37.1 ### frps Version 0.37.1 ### System Architecture linux/amd64 + windows/amd64 ### Configurations .... vhost_http_port= 80, 81, 82 vhost_https_port= 443 .... custom_domains = 我的域名1.com custom_domains = 我的域名2.com .... ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:19:07 -06:00
Author
Owner

@luozongcong commented on GitHub (Sep 5, 2021):

前提1:windows server 2012 r2 datacenter 或windows 10 21H 环境下【frp_0.37.1_windows_amd64】 下的frps.exe启动成功,启动frps,exe正常

结果1:但是如果启动frpc,exe连接就会异常 vhost_http_port is not set


前提2:如果是用【frp_0.37.1_linux_amd64】frps则正常

结果2:启动frpc,exe正常


配置如下:
frps.ini

[common]
bind_port = 7000
vhost_http_port = 80
vhost_https_port = 443

# frp管理后台端口,请按自己需求更改
dashboard_port = 7500
# frp管理后台用户名和密码,请改成自己的
dashboard_user = admin
dashboard_pwd = admin
enable_prometheus = true

# frp日志配置
log_file = /var/log/frps.log
log_level = info
log_max_days = 3


frpc.ini

[common]
server_addr = api.我的域名.com
server_port = 7000

#http服务
[web_80]
type = http
local_port = 8072

custom_domains = api.我的域名.com
<!-- gh-comment-id:913135007 --> @luozongcong commented on GitHub (Sep 5, 2021): 前提1:windows server 2012 r2 datacenter 或windows 10 21H 环境下【frp_0.37.1_windows_amd64】 下的frps.exe启动成功,启动frps,exe正常 结果1:但是如果启动frpc,exe连接就会异常 vhost_http_port is not set --- 前提2:如果是用【frp_0.37.1_linux_amd64】frps则正常 结果2:启动frpc,exe正常 --- 配置如下: frps.ini ``` [common] bind_port = 7000 vhost_http_port = 80 vhost_https_port = 443 # frp管理后台端口,请按自己需求更改 dashboard_port = 7500 # frp管理后台用户名和密码,请改成自己的 dashboard_user = admin dashboard_pwd = admin enable_prometheus = true # frp日志配置 log_file = /var/log/frps.log log_level = info log_max_days = 3 ``` frpc.ini ``` [common] server_addr = api.我的域名.com server_port = 7000 #http服务 [web_80] type = http local_port = 8072 custom_domains = api.我的域名.com ```
Author
Owner

@luozongcong commented on GitHub (Sep 5, 2021):

如果配置
vhost_http_port= 80, 81, 82
改成
vhost_http_ports= 80, 81, 82
仅80生效

<!-- gh-comment-id:913137663 --> @luozongcong commented on GitHub (Sep 5, 2021): 如果配置 vhost_http_port= 80, 81, 82 改成 vhost_http_ports= 80, 81, 82 仅80生效
Author
Owner

@fatedier commented on GitHub (Sep 6, 2021):

You can only set one port for vhost_http_port now.

<!-- gh-comment-id:913382577 --> @fatedier commented on GitHub (Sep 6, 2021): You can only set one port for `vhost_http_port` now.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 7, 2021):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:937347771 --> @github-actions[bot] commented on GitHub (Oct 7, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2042
No description provided.