rewrite directive is no longer working
See original GitHub issueChecklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latest
docker image?- Yes
- Are you sure you’re not using someone else’s docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes
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:
- Go to ‘any proxy host’
- Click on ‘advanced’
- put a rewrite directive like
rewrite ^/about$ /preferences last;
- test it and it won’t work.
Expected behavior
the rewrite directive should work, and rewrite URLs as instructed.
Screenshots
Operating System
Debian 11/docker
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:16
Top Results From Across the Web
rewrite directive is no longer working · Issue #1584 - GitHub
9.11+ ? ... Steps to reproduce the behavior: Go to 'any proxy host'; Click on 'advanced'; put a rewrite directive like rewrite ^/about$...
Read more >Nginx rewrite module not working - Server Fault
The issue here is that rewrite directive destination part is always relative to the root directory. So, assuming your setup is like this:....
Read more >Module ngx_http_rewrite_module - Nginx.org
The ngx_http_rewrite_module module is used to change request URI using PCRE regular expressions, return redirects, and conditionally select configurations.
Read more >How to Create NGINX Rewrite Rules
In this blog post, we discuss how to create NGINX rewrite rules (the same methods work for both NGINX Plus and the open...
Read more >RewriteEngine doesn't work outside <VirtualHost> Directive ...
1 Answer 1 ... The reason why it appears that the Rewrite* directives do not work in the server configuration and need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tried on the
github-pr-1578
image and rewrites also dont work. I have a wss custom location that sends/ws
to a different port, and need to rewrite/ws
to root/
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.