[GH-ISSUE #2245] set frpc to access two local nginx virtual servers with different ports #1788

Closed
opened 2026-05-05 13:09:18 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @klikdadang on GitHub (Feb 15, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2245

[REQUIRED] hat version of frp are you using

Version: frp_0.33.0_linux_amd64

[REQUIRED] What operating system and processor architecture are you using
OS: ubuntu 18
CPU architecture: 64

[REQUIRED] description of errors
i tried to set frpc.ini to access my local virtual web server using different port, but i only can access my 80 port. i can't access my 8821 port

  1. https://mydomain.com --> worked
  2. https://mydoman.com:8821 --> not worked

confile

log file

Steps to reproduce the issue

  1. my frpc.ini
    ....
    [web01]
    type : http
    local_port : 80
    custom_domains : mydomain.com
    location : /

[web01]
type : http
local_port : 80
custom_domains : mydomain.com:8821
location : /8821

  1. restarting frpc service
  2. restarting nginx service

Supplementary information
I have tried to find a solution from the issues page but I couldn't find it
please forgive me if this has been discussed before

Can you guess what caused this issue

Checklist:

  • I included all information required in the sections above
  • [] I made sure there are no duplicates of this report (Use Search)
Originally created by @klikdadang on GitHub (Feb 15, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2245 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version: frp_0.33.0_linux_amd64 **[REQUIRED] What operating system and processor architecture are you using** OS: ubuntu 18 CPU architecture: 64 **[REQUIRED] description of errors** i tried to set frpc.ini to access my local virtual web server using different port, but i only can access my 80 port. i can't access my 8821 port 1. https://mydomain.com --> worked 2. https://mydoman.com:8821 --> not worked **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> **Steps to reproduce the issue** 1. my frpc.ini .... [web01] type : http local_port : 80 custom_domains : mydomain.com location : / [web01] type : http local_port : 80 custom_domains : mydomain.com:8821 location : /8821 2. restarting frpc service 3. restarting nginx service **Supplementary information** I have tried to find a solution from the issues page but I couldn't find it please forgive me if this has been discussed before **Can you guess what caused this issue** **Checklist**: <!--- Make sure you've completed the following steps (put an "X" between of brackets): --> - [X] I included all information required in the sections above - [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/fatedier/frp/issues?q=is%3Aissue)
gitea-mirror 2026-05-05 13:09:18 -06:00
Author
Owner

@klikdadang commented on GitHub (Feb 15, 2021):

sorry, this is my frpc configuration:

[web01]
type : http
local_port : 80
custom_domains : mydomain.com
location : /

[web02]
type : http
local_port : 8821
custom_domains : mydomain.com:8821
location : /8821

<!-- gh-comment-id:779299526 --> @klikdadang commented on GitHub (Feb 15, 2021): sorry, this is my frpc configuration: [web01] type : http local_port : 80 custom_domains : mydomain.com location : / [web02] type : http local_port : 8821 custom_domains : mydomain.com:8821 location : /8821
Author
Owner

@fatedier commented on GitHub (Feb 18, 2021):

You can't do that since you can only set one vhost_http_port in frps.ini.

Try use type tcp instead?

<!-- gh-comment-id:781031239 --> @fatedier commented on GitHub (Feb 18, 2021): You can't do that since you can only set one vhost_http_port in frps.ini. Try use type tcp instead?
Author
Owner

@github-actions[bot] commented on GitHub (Apr 5, 2021):

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

<!-- gh-comment-id:813125481 --> @github-actions[bot] commented on GitHub (Apr 5, 2021): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d 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#1788
No description provided.