[GH-ISSUE #2801] [Feature Request] How to expose multiple local web servers with a single public domain #2239

Closed
opened 2026-05-05 13:26:28 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @JimBeam2019 on GitHub (Feb 15, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2801

Describe the feature request

Hi there, I've experimented with the "Visit your web service in LAN by custom domains" example and it worked well with one local web server, but I was wondering if it is possible to expose multiple local web servers, say hundreds of them, with one public domain. Please any advice will be appreciated.

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @JimBeam2019 on GitHub (Feb 15, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2801 ### Describe the feature request Hi there, I've experimented with the "Visit your web service in LAN by custom domains" example and it worked well with one local web server, but I was wondering if it is possible to expose multiple local web servers, say hundreds of them, with one public domain. Please any advice will be appreciated. ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [X] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:26:28 -06:00
Author
Owner

@fatedier commented on GitHub (Feb 15, 2022):

Try https://github.com/fatedier/frp#load-balancing

<!-- gh-comment-id:1039819697 --> @fatedier commented on GitHub (Feb 15, 2022): Try https://github.com/fatedier/frp#load-balancing
Author
Owner

@JimBeam2019 commented on GitHub (Feb 15, 2022):

Try https://github.com/fatedier/frp#load-balancing

Thank you for your quick reply @fatedier , though I think there is a misunderstanding.

What I meant was the vhost can only connect to one local web server, but it fails to connect to a second one. It simply returned the error message [W] [control.go:447] [128472af6ade081b] new proxy [web] error: router config conflict. So, my question is that if I would like to set a proxy server in the cloud with a public domain to expose multiple local web servers, how can I do that using frp?

<!-- gh-comment-id:1039920277 --> @JimBeam2019 commented on GitHub (Feb 15, 2022): > Try https://github.com/fatedier/frp#load-balancing Thank you for your quick reply @fatedier , though I think there is a misunderstanding. What I meant was the vhost can only connect to one local web server, but it fails to connect to a second one. It simply returned the error message `[W] [control.go:447] [128472af6ade081b] new proxy [web] error: router config conflict`. So, my question is that if I would like to set a proxy server in the cloud with a public domain to expose multiple local web servers, how can I do that using frp?
Author
Owner

@fatedier commented on GitHub (Feb 15, 2022):

load-balancing is what you want. Requests to same domain will route to different local web server round robin.

<!-- gh-comment-id:1039948147 --> @fatedier commented on GitHub (Feb 15, 2022): `load-balancing` is what you want. Requests to same domain will route to different local web server round robin.
Author
Owner

@JimBeam2019 commented on GitHub (Feb 15, 2022):

load-balancing is what you want. Requests to same domain will route to different local web server round robin.

Excuse me, I don't really get what you mean. The load-balancing seems to be running in the local web server by configuring the frpc.ini file. Are you suggesting doing the same configuration on the frps.ini file in public vhost?

<!-- gh-comment-id:1039995312 --> @JimBeam2019 commented on GitHub (Feb 15, 2022): > `load-balancing` is what you want. Requests to same domain will route to different local web server round robin. Excuse me, I don't really get what you mean. The `load-balancing` seems to be running in the local web server by configuring the **frpc.ini** file. Are you suggesting doing the same configuration on the **frps.ini** file in public vhost?
Author
Owner

@github-actions[bot] commented on GitHub (Mar 18, 2022):

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

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

@albenex commented on GitHub (Apr 16, 2022):

I've same request as OP:
I have different web services (dump1090 daemon, home assistant interface, car controller interface etc..)
FRP works great tunneling SSH connections and first web-service configured inside FRPC.ini on Server "B".
further web-services configured won't work.

desired behavior would be configuring FRPC.ini like this:

# Home assistant 
[web]
type = tcp
local_port = 8123
remote_port = 5003
local_ip = 127.0.0.1

# dump1090 
[web]
type = tcp
local_port = 80
remote_port = 5001
local_ip = 127.0.0.1

# car controller
[web]
type = tcp
local_port = 5000
remote_port = 5000
local_ip = 127.0.0.1

load balancing feature is meant for a number of duplicate web services hooked to different ports but exposed with same one.

here we're requesting multiple web services hooked to different ports, exposed to different ports.

<!-- gh-comment-id:1100525693 --> @albenex commented on GitHub (Apr 16, 2022): I've same request as OP: I have different web services (dump1090 daemon, home assistant interface, car controller interface etc..) FRP works great tunneling SSH connections and first web-service configured inside FRPC.ini on Server "B". further web-services configured won't work. desired behavior would be configuring FRPC.ini like this: ``` # Home assistant [web] type = tcp local_port = 8123 remote_port = 5003 local_ip = 127.0.0.1 # dump1090 [web] type = tcp local_port = 80 remote_port = 5001 local_ip = 127.0.0.1 # car controller [web] type = tcp local_port = 5000 remote_port = 5000 local_ip = 127.0.0.1 ``` load balancing feature is meant for a number of duplicate web services hooked to different ports but exposed with same one. here we're requesting multiple web services hooked to different ports, exposed to different ports.
Author
Owner

@fatedier commented on GitHub (Apr 16, 2022):

I've same request as OP: I have different web services (dump1090 daemon, home assistant interface, car controller interface etc..) FRP works great tunneling SSH connections and first web-service configured inside FRPC.ini on Server "B". further web-services configured won't work.

desired behavior would be configuring FRPC.ini like this:

# Home assistant 
[web]
type = tcp
local_port = 8123
remote_port = 5003
local_ip = 127.0.0.1

# dump1090 
[web]
type = tcp
local_port = 80
remote_port = 5001
local_ip = 127.0.0.1

# car controller
[web]
type = tcp
local_port = 5000
remote_port = 5000
local_ip = 127.0.0.1

load balancing feature is meant for a number of duplicate web services hooked to different ports but exposed with same one.

here we're requesting multiple web services hooked to different ports, exposed to different ports.

# Home assistant 
[web-home-assistant]
type = tcp
local_port = 8123
remote_port = 5003
local_ip = 127.0.0.1

# dump1090 
[web-dump1090]
type = tcp
local_port = 80
remote_port = 5001
local_ip = 127.0.0.1

# car controller
[web-car-controller]
type = tcp
local_port = 5000
remote_port = 5000
local_ip = 127.0.0.1
<!-- gh-comment-id:1100567007 --> @fatedier commented on GitHub (Apr 16, 2022): > I've same request as OP: I have different web services (dump1090 daemon, home assistant interface, car controller interface etc..) FRP works great tunneling SSH connections and first web-service configured inside FRPC.ini on Server "B". further web-services configured won't work. > > desired behavior would be configuring FRPC.ini like this: > > ``` > # Home assistant > [web] > type = tcp > local_port = 8123 > remote_port = 5003 > local_ip = 127.0.0.1 > > # dump1090 > [web] > type = tcp > local_port = 80 > remote_port = 5001 > local_ip = 127.0.0.1 > > # car controller > [web] > type = tcp > local_port = 5000 > remote_port = 5000 > local_ip = 127.0.0.1 > ``` > > load balancing feature is meant for a number of duplicate web services hooked to different ports but exposed with same one. > > here we're requesting multiple web services hooked to different ports, exposed to different ports. ```ini # Home assistant [web-home-assistant] type = tcp local_port = 8123 remote_port = 5003 local_ip = 127.0.0.1 # dump1090 [web-dump1090] type = tcp local_port = 80 remote_port = 5001 local_ip = 127.0.0.1 # car controller [web-car-controller] type = tcp local_port = 5000 remote_port = 5000 local_ip = 127.0.0.1 ```
Author
Owner

@albenex commented on GitHub (Apr 18, 2022):

thank you very much! it worked

<!-- gh-comment-id:1101167479 --> @albenex commented on GitHub (Apr 18, 2022): > thank you very much! it worked
Author
Owner

@didibaba commented on GitHub (Oct 31, 2023):

@albenex how to configure frps.ini of the server for your case?

<!-- gh-comment-id:1786415555 --> @didibaba commented on GitHub (Oct 31, 2023): @albenex how to configure frps.ini of the server for your case?
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#2239
No description provided.