プロジェクト

全般

プロフィール

Vote #77082

未完了

Documentation for nginx configuration is outdated and broken

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Documentation_24
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
24
version_id:
0
issue_org_id:
21682
author_id:
142733
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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.


journals

--------------------------------------------------------------------------------
You can edit wiki.
--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0