[GH-ISSUE #156] Add a server path option to proxy the asynqmon #386

Open
opened 2026-03-07 22:14:57 +03:00 by kerem · 10 comments
Owner

Originally created by @lufishggg on GitHub (Sep 17, 2021).
Original GitHub issue: https://github.com/hibiken/asynqmon/issues/156

For example there is an application running at port 3000, asynqmon running at port 3001. We want the path /asynqmon to proxy to port 3001, which now is impossible because of the path prefix unmatch.

Originally created by @lufishggg on GitHub (Sep 17, 2021). Original GitHub issue: https://github.com/hibiken/asynqmon/issues/156 For example there is an application running at port 3000, asynqmon running at port 3001. We want the path /asynqmon to proxy to port 3001, which now is impossible because of the path prefix unmatch.
Author
Owner

@hibiken commented on GitHub (Sep 21, 2021):

@lufishggg thank you for opening this issue!

What are you using for reverse proxy? Also, would you mind giving more details on what's making things impossible?

<!-- gh-comment-id:923482923 --> @hibiken commented on GitHub (Sep 21, 2021): @lufishggg thank you for opening this issue! What are you using for reverse proxy? Also, would you mind giving more details on what's making things impossible?
Author
Owner

@lufishggg commented on GitHub (Sep 22, 2021):

For example, I have an application which is used as a management platform, we call it A. There is a host like test.xxx.com. The nginx will proxy all requests whose path prefix is /admin to A. For example, test.xxx.com/admin/users/1, test.xxx.com/admin/factories. We want some paths to proxy to asynqmon, like test.xxx.com/admin/asynqmon/asynqmon/redis, ...

Why we need a path prefix '/admin'? Because those requests without path prefix will lead to another application B.

It likes that the asynqmon is a part of the management platform.

If we clone the project and we change the base path and server path, and then we build and deploy asynqmon, this may be done. But we think that adding the proxy path option is better, so we do not need to change the code of the project.

The server path has this advantage:

  1. The nginx can do basic auth depending on the path prefix;
  2. The nginix can do the ip white list depending on the path prefix.
  3. Make the applications more organizational.

So the server path should be better to include all path that asynqmon provides, like /static, /api ... For example, if we add option(option or environment variable) like --server-path="/admin/asynqmon", all paths have this prefix. Maybe should change the build process of the react.

Thanks for consideration.

<!-- gh-comment-id:924510349 --> @lufishggg commented on GitHub (Sep 22, 2021): For example, I have an application which is used as a management platform, we call it A. There is a host like test.xxx.com. The nginx will proxy all requests whose path prefix is /admin to A. For example, test.xxx.com/admin/users/1, test.xxx.com/admin/factories. We want some paths to proxy to asynqmon, like test.xxx.com/admin/asynqmon/asynqmon/redis, ... Why we need a path prefix '/admin'? Because those requests without path prefix will lead to another application B. It likes that the asynqmon is a part of the management platform. If we clone the project and we change the base path and server path, and then we build and deploy asynqmon, this may be done. But we think that adding the proxy path option is better, so we do not need to change the code of the project. The server path has this advantage: 1. The nginx can do basic auth depending on the path prefix; 2. The nginix can do the ip white list depending on the path prefix. 3. Make the applications more organizational. So the server path should be better to include all path that asynqmon provides, like /static, /api ... For example, if we add option(option or environment variable) like --server-path="/admin/asynqmon", all paths have this prefix. Maybe should change the build process of the react. Thanks for consideration.
Author
Owner

@flamedmg commented on GitHub (Sep 22, 2021):

I have the same issue, i tried to use asynqmon as a docker image and bind it to:
/asynqmon
Html loads just fine, but app requests all it's resources from the root
CleanShot 2021-09-22 at 19 59 03@2x

<!-- gh-comment-id:925111765 --> @flamedmg commented on GitHub (Sep 22, 2021): I have the same issue, i tried to use asynqmon as a docker image and bind it to: /asynqmon Html loads just fine, but app requests all it's resources from the root <img width="817" alt="CleanShot 2021-09-22 at 19 59 03@2x" src="https://user-images.githubusercontent.com/416393/134388386-7adb71f6-a19c-45e1-a790-800acec0194f.png">
Author
Owner

@hibiken commented on GitHub (Sep 23, 2021):

Ok let me looking into this in the coming weeks! If this is urgent, please feel free to open a PR!

<!-- gh-comment-id:925992732 --> @hibiken commented on GitHub (Sep 23, 2021): Ok let me looking into this in the coming weeks! If this is urgent, please feel free to open a PR!
Author
Owner

@lufishggg commented on GitHub (Sep 26, 2021):

Thanks!

<!-- gh-comment-id:927307711 --> @lufishggg commented on GitHub (Sep 26, 2021): Thanks!
Author
Owner

@nickxudotme commented on GitHub (Mar 13, 2023):

I met the same situation, is there any progress today?

<!-- gh-comment-id:1465430964 --> @nickxudotme commented on GitHub (Mar 13, 2023): I met the same situation, is there any progress today?
Author
Owner

@hellowords commented on GitHub (Dec 14, 2023):

add nginx location

  location ^~/api/monitoring/tasks {
    proxy_pass http://127.0.0.1:3001;
    proxy_redirect             off;
    proxy_set_header           Host             $host;
    proxy_set_header           X-Real-IP        $remote_addr;
    proxy_set_header           X-Forwarded-For  $proxy_add_x_forwarded_for;
  }
<!-- gh-comment-id:1856182074 --> @hellowords commented on GitHub (Dec 14, 2023): add nginx location ``` location ^~/api/monitoring/tasks { proxy_pass http://127.0.0.1:3001; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ```
Author
Owner

@giangnh13579 commented on GitHub (Aug 4, 2024):

I'm in the same situation, is this available now

<!-- gh-comment-id:2267284752 --> @giangnh13579 commented on GitHub (Aug 4, 2024): I'm in the same situation, is this available now
Author
Owner

@jerrychan807 commented on GitHub (Jun 25, 2025):

+1

<!-- gh-comment-id:3004539966 --> @jerrychan807 commented on GitHub (Jun 25, 2025): +1
Author
Owner

@jerrychan807 commented on GitHub (Jun 25, 2025):

u can try this. https://github.com/jerrychan807/asynqmon
Solution:

  1. Modify the Asynqmon source code to add a server path option.
  2. Recompile Asynqmon.
<!-- gh-comment-id:3004738068 --> @jerrychan807 commented on GitHub (Jun 25, 2025): u can try this. https://github.com/jerrychan807/asynqmon Solution: 1. Modify the Asynqmon source code to add a server path option. 2. Recompile Asynqmon.
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
starred/asynqmon#386
No description provided.