mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #1584] rewrite directive is no longer working #1196
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FarisZR on GitHub (Nov 13, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1584
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
the rewrite directive has no effect when put into the advanced tab
for example
rewrite ^/about$ /preferences last;this works on LSIO SWAG, but doesn't work on NPM.
this issue started around the beginning of November, maybe something changed in OpenResty ? or a regression in v2.9.11+ ?
Nginx Proxy Manager Version
v2.9.12
To Reproduce
Steps to reproduce the behavior:
rewrite ^/about$ /preferences last;Expected behavior
the rewrite directive should work, and rewrite URLs as instructed.
Screenshots
Operating System
Debian 11/docker
Additional context
@chaptergy commented on GitHub (Nov 13, 2021):
I'm 90% certain this is due to the variables introduced for the
proxy_passa while ago. But due to other issues this introduced as well, it has been reverted. So this should be fixed when the next release comes. You can watch this repo at the top of the page to get notified when a new release is published. If your issue is not resolved in the next version, please comment on this issue again, and I will reopen it.@FarisZR commented on GitHub (Nov 13, 2021):
Any ETA on the next release ?
-------- Original Message --------
On Nov. 13, 2021, 9:17 p.m., jc21/nginx-proxy-manager - reply+aipxadvzndne2bo773wtyun7tprd7evbnhhd5p34xu at reply.github.com wrote:
@chaptergy commented on GitHub (Nov 13, 2021):
No, since there have not been any other changes since the previous version it might still take some time. You could also use this docker image while waiting for the new version:
jc21/nginx-proxy-manager:github-pr-1578@FarisZR commented on GitHub (Nov 13, 2021):
i just tested the PR version, there is no difference, it still doesn't work.
i removed and added the proxy host again to make sure that the config file was reloaded
@FarisZR commented on GitHub (Nov 14, 2021):
i just tried it with a new installation, same result.
@diwu1989 commented on GitHub (Nov 14, 2021):
Tried on the
github-pr-1578image and rewrites also dont work.I have a wss custom location that sends
/wsto a different port, and need to rewrite/wsto root/@diwu1989 commented on GitHub (Nov 14, 2021):
From looking at the template, it looks like
$forward_pathget set intoproxy_passbefore any advanced location sections are added at the bottom of the template.Wouldn't any rewrite rule need to be included at the very top?
@FarisZR commented on GitHub (Nov 14, 2021):
you can edit the configs manually to see if this is the actual issue.
configs are located in /data/nginx.
i tried modifying the configs but nothing changed, it still doesn't work.
@brtwrst commented on GitHub (Nov 20, 2021):
Can we please get a release for this?
Custom locations are completely broken for me and editing the settings manually every time does get old quick.
@FarisZR commented on GitHub (Nov 26, 2021):
rewrites seem to work if you put the directive inside a location
for example
@FarisZR commented on GitHub (Dec 24, 2021):
this is still not fixed btw.
and the work around i posted earlier doesn't always work
@brtwrst commented on GitHub (Jan 4, 2022):
This seems fixed now.
I re-saved the configs that have custom locations and they all worked without having to manually edit the config files.
@chaptergy commented on GitHub (Jan 4, 2022):
Great to hear, thanks for the feedback!
@FarisZR commented on GitHub (Jan 6, 2022):
I still can't get it to work. even on the latest release.
i tried it with
rewrite ^/test$ /new last;@timdonovanuk commented on GitHub (Aug 2, 2022):
This was working, then I updated to the latest version, and it's broken again.
@brtwrst commented on GitHub (Aug 2, 2022):
Can confirm that my custom locations are breaking after editing and re-saving. with the current :latest versionMade it work again by using the "add custom nginx config here at own risk" option of the custom locations.