[GH-ISSUE #1789] "proxy_pass" cannot have URI part in location given by regular expression #1321

Closed
opened 2026-02-26 07:30:29 +03:00 by kerem · 4 comments
Owner

Originally created by @binsentsu on GitHub (Jan 22, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1789

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes / No
  • Are you sure you're not using someone else's docker image?
    • Yes / No
  • Have you searched for similar issues (both open and closed)?
    • Yes / No

Describe the bug

Within version 2.9.11 regular expressions were supported with custom location configurations.
Example: ~ ^(/~[^/]+)?(?:/|/path)?$
Now upgraded to 2.9.15 and this functionality is not working anymore.
Nginx shows error when bringing up the proxy:
"proxy_pass" cannot have URI part in location given by regular expression

It seems to me that commit github.com/NginxProxyManager/nginx-proxy-manager@1f879f67a9 (diff-d59b1035c5) introduced in 2.9.13 has changed this behavior.

Within 2.9.11 the proxy_pass referenced variable $upstream which is likely to work together with regular expression locations.

Don't know why code stepped away from using a variable, but would it be possible to re-enable this 'feature'?

Nginx Proxy Manager Version

v2.9.15

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom location config containing regular expression.

Expected behavior

Working as in 2.9.11

Screenshots

Operating System

Additional context

Originally created by @binsentsu on GitHub (Jan 22, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1789 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - **Yes** / No - Are you sure you're not using someone else's docker image? - **Yes** / No - Have you searched for similar issues (both open and closed)? - **Yes** / No **Describe the bug** <!-- A clear and concise description of what the bug is. --> Within version 2.9.11 regular expressions were supported with custom location configurations. Example: `~ ^(/~[^/]+)?(?:/|/path)?$` Now upgraded to 2.9.15 and this functionality is not working anymore. Nginx shows error when bringing up the proxy: `"proxy_pass" cannot have URI part in location given by regular expression` It seems to me that commit https://github.com/NginxProxyManager/nginx-proxy-manager/commit/1f879f67a9bed8f5eb444d00ad47c353b8a75db8#diff-d59b1035c588d4d81d509bb6c436f753aa5256a9cada91f28b6afc55b26d2c6b introduced in 2.9.13 has changed this behavior. Within 2.9.11 the proxy_pass referenced variable $upstream which is likely to work together with regular expression locations. Don't know why code stepped away from using a variable, but would it be possible to re-enable this 'feature'? **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.9.15 **To Reproduce** Steps to reproduce the behavior: 1) Create a custom location config containing regular expression. **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Working as in 2.9.11 **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. -->
kerem 2026-02-26 07:30:29 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@bytebone commented on GitHub (Mar 7, 2023):

It's a little crazy to me that this has gone completely unanswered and unseen for over a year. I am stuck with NPM not wanting to use RegEx, and find it infuriating. I can see that the expressions are being applied into the config file, yet they simply don't work. And other times, when I try to apply the config, the host just gets disabled.

What reason can there be to not have this working? Is there a switch somewhere I can toggle, a module I should install, or anything else I can do to get this working? If there's simply no option to use RegEx, and no change in sight, I might have to drop NPM alltogether, which would be a shame really.

I am experiencing this on NPM v2.9.18.

<!-- gh-comment-id:1458940463 --> @bytebone commented on GitHub (Mar 7, 2023): It's a little crazy to me that this has gone completely unanswered and unseen for over a year. I am stuck with NPM not wanting to use RegEx, and find it infuriating. I can see that the expressions are being applied into the config file, yet they simply don't work. And other times, when I try to apply the config, the host just gets disabled. What reason can there be to not have this working? Is there a switch somewhere I can toggle, a module I should install, or anything else I can do to get this working? If there's simply no option to use RegEx, and no change in sight, I might have to drop NPM alltogether, which would be a shame really. I am experiencing this on NPM v2.9.18.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 26, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1963182195 --> @github-actions[bot] commented on GitHub (Feb 26, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Apr 11, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2795662752 --> @github-actions[bot] commented on GitHub (Apr 11, 2025): Issue was closed due to inactivity.
Author
Owner

@7heMech commented on GitHub (Nov 13, 2025):

Is it still the case?

<!-- gh-comment-id:3529665582 --> @7heMech commented on GitHub (Nov 13, 2025): Is it still the 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
starred/nginx-proxy-manager-NginxProxyManager#1321
No description provided.