Defect #21682

Documentation for nginx configuration is outdated and broken

Added by Erik H about 7 years ago. Updated about 7 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:


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: )
if ($uri !~* "^/projects/.*(copy|destroy|archive)") {
    rewrite ^/projects(.*)$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.


#1 Updated by Toshi MARUYAMA about 7 years ago

  • Description updated (diff)

#2 Updated by Toshi MARUYAMA about 7 years ago

You can edit wiki.

Also available in: Atom PDF