Actions
Defect #21682
openDocumentation for nginx configuration is outdated and broken
Status:
New
Priority:
Normal
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
I set up Redmine with nginx as a reverse proxy according to this HowTo: HowTo_configure_Nginx_to_run_Redmine
For the most part it seems to work normally. Then I tried to delete a project which did not work.
The HowTo's nginx configuration rewrites some "sensitive" paths to https and then rewrites back to http for "non-sensitive" paths except some paths that would be broken otherwise:
# Examples of URLs we don't want to rewrite (otherwise 404 errors occur): # /projects/PROJECTNAME/archive?status= # /projects/copy/PROJECTNAME # /projects/PROJECTNAME/destroy # This should exclude those (tested here: http://www.regextester.com/ ) if ($uri !~* "^/projects/.*(copy|destroy|archive)") { rewrite ^/projects(.*) http://your.domain.here$request_uri permanent; }
As far as I can see these excluded paths are outdated. This does for example break the DELETE request upon project deletion.
I worked around this by commenting out all the rewriting stuff and just defaulting to https with:
server { listen 80; return 301 https://$server_name$request_uri; }
(In my opinion this is should be done anyways because data of non-public projects musn't be sent over http...)
The regex has to be updated to match the new path structure.
Actions