[GH-ISSUE #3791] [web] start error: type [http] not supported when vhost http port is not set #3018

Closed
opened 2026-05-05 13:57:00 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @waitforyou2 on GitHub (Nov 22, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3791

Bug Description

使用0.52.3Linux版配置frps.toml,客户端和服务端都是Linux
[common]
bindPort = 7000
vhost_http_port = 8080 #当代理出来的是web服务时,在外网访问http://vps的IP:7001
#dashboard_port状态以及代理统计信息展示,网址:7500可查看详情
dashboard_port = 7500
#dashboard_user访问用户dashboard_pwd访问密码
dashboard_user = admin
dashboard_pwd = password
就一直报错没有设置,不管是用大写的vhostHTTPPort 都不行
客户端配置如下
serverAddr = "xx.xx.xx.xx"
serverPort = 7000

proxies
name ="ssh"
type = "tcp"
localIP="127.0.0.1"
localPort=22
remotePort=6000
proxies
name = "web"
type="http"
localIP="127.0.0.1"
localPort=80
remotePort=6001
customDomains=["www.baizz.com"]

frpc Version

0.52.3

frps Version

0.52.3

System Architecture

linux/amd64

Configurations

使用0.52.3Linux版配置frps.toml,客户端和服务端都是Linux
[common]
bindPort = 7000
vhost_http_port = 8080 #当代理出来的是web服务时,在外网访问http://vps的IP:7001
#dashboard_port状态以及代理统计信息展示,网址:7500可查看详情
dashboard_port = 7500
#dashboard_user访问用户dashboard_pwd访问密码
dashboard_user = admin
dashboard_pwd = password
就一直报错没有设置,不管是用大写的vhostHTTPPort 都不行
客户端配置如下
serverAddr = "xx.xx.xx.xx"
serverPort = 7000

proxies
name ="ssh"
type = "tcp"
localIP="127.0.0.1"
localPort=22
remotePort=6000
proxies
name = "web"
type="http"
localIP="127.0.0.1"
localPort=80
remotePort=6001
customDomains=["www.baizz.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 @waitforyou2 on GitHub (Nov 22, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3791 ### Bug Description 使用0.52.3Linux版配置frps.toml,客户端和服务端都是Linux [common] bindPort = 7000 vhost_http_port = 8080 #当代理出来的是web服务时,在外网访问http://vps的IP:7001 #dashboard_port状态以及代理统计信息展示,网址:7500可查看详情 dashboard_port = 7500 #dashboard_user访问用户dashboard_pwd访问密码 dashboard_user = admin dashboard_pwd = password 就一直报错没有设置,不管是用大写的vhostHTTPPort 都不行 客户端配置如下 serverAddr = "xx.xx.xx.xx" serverPort = 7000 [[proxies]] name ="ssh" type = "tcp" localIP="127.0.0.1" localPort=22 remotePort=6000 [[proxies]] name = "web" type="http" localIP="127.0.0.1" localPort=80 remotePort=6001 customDomains=["www.baizz.com"] ### frpc Version 0.52.3 ### frps Version 0.52.3 ### System Architecture linux/amd64 ### Configurations 使用0.52.3Linux版配置frps.toml,客户端和服务端都是Linux [common] bindPort = 7000 vhost_http_port = 8080 #当代理出来的是web服务时,在外网访问http://vps的IP:7001 #dashboard_port状态以及代理统计信息展示,网址:7500可查看详情 dashboard_port = 7500 #dashboard_user访问用户dashboard_pwd访问密码 dashboard_user = admin dashboard_pwd = password 就一直报错没有设置,不管是用大写的vhostHTTPPort 都不行 客户端配置如下 serverAddr = "xx.xx.xx.xx" serverPort = 7000 [[proxies]] name ="ssh" type = "tcp" localIP="127.0.0.1" localPort=22 remotePort=6000 [[proxies]] name = "web" type="http" localIP="127.0.0.1" localPort=80 remotePort=6001 customDomains=["www.baizz.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:57:00 -06:00
Author
Owner

@superzjg commented on GitHub (Nov 22, 2023):

配置文件一堆错误。你不要把 ini 格式和 toml 格式混在一起用。他们的名称大部分不一样。

这里有 http 代理的示例:
https://gofrp.org/zh-cn/docs/examples/vhost-http/

ini格式参数列表:
https://github.com/fatedier/frp/blob/dev/conf/legacy/frpc_legacy_full.ini
https://github.com/fatedier/frp/blob/dev/conf/legacy/frps_legacy_full.ini

toml格式参数列表:比较严格,写错一点都不行:
https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml
https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml

<!-- gh-comment-id:1822302593 --> @superzjg commented on GitHub (Nov 22, 2023): 配置文件一堆错误。你不要把 ini 格式和 toml 格式混在一起用。他们的名称大部分不一样。 这里有 http 代理的示例: https://gofrp.org/zh-cn/docs/examples/vhost-http/ ini格式参数列表: https://github.com/fatedier/frp/blob/dev/conf/legacy/frpc_legacy_full.ini https://github.com/fatedier/frp/blob/dev/conf/legacy/frps_legacy_full.ini toml格式参数列表:比较严格,写错一点都不行: https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml
Author
Owner

@github-actions[bot] commented on GitHub (Dec 23, 2023):

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

<!-- gh-comment-id:1868151226 --> @github-actions[bot] commented on GitHub (Dec 23, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@ErYiii commented on GitHub (Feb 4, 2024):

@waitforyou2 哥们儿解决了吗,我现在也是这个问题,其他的代理都没问题,就这个http一直提示这个错误error: type [http] not supported when vhost http port is not set

<!-- gh-comment-id:1925753064 --> @ErYiii commented on GitHub (Feb 4, 2024): @waitforyou2 哥们儿解决了吗,我现在也是这个问题,其他的代理都没问题,就这个http一直提示这个错误error: type [http] not supported when vhost http port is not set
Author
Owner

@NoiseFan commented on GitHub (Feb 26, 2024):

需要在服务端配置两个参数
vhostHTTPPort = 80
vhostHTTPSPort = 443

<!-- gh-comment-id:1964324950 --> @NoiseFan commented on GitHub (Feb 26, 2024): 需要在服务端配置两个参数 vhostHTTPPort = 80 vhostHTTPSPort = 443
Author
Owner

@stevenup commented on GitHub (Dec 25, 2024):

@superzjg noted that the format of ini and toml are totally different, which helped me solve the problem.

<!-- gh-comment-id:2561882351 --> @stevenup commented on GitHub (Dec 25, 2024): @superzjg noted that the format of ini and toml are totally different, which helped me solve the problem.
Author
Owner

@liliewin commented on GitHub (Mar 24, 2026):

我也遇到问题,其实就是参数全部要用驼峰的写法,不能写下划线的参数

<!-- gh-comment-id:4114819566 --> @liliewin commented on GitHub (Mar 24, 2026): 我也遇到问题,其实就是参数全部要用驼峰的写法,不能写下划线的参数
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#3018
No description provided.