Commit 3b868260 authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

flyspray: Add support for bugs.al.org->GitLab redirect

To be used as we begin migrating Flyspray tasks to GitLab.

Fix #320
parent 1f59fffa
......@@ -32,6 +32,9 @@
when: maintenance is not defined
tags: ['nginx']
- name: install nginx migrated-tasks.map
copy: src=migrated-tasks.map dest=/etc/nginx/maps/ owner=root group=root mode=0644
- name: make nginx log dir
file: path=/var/log/nginx/{{ flyspray_domain }} state=directory owner=root group=root mode=0755
......
......@@ -19,6 +19,11 @@ server {
}
}
map $uri $redirect {
default "";
include maps/migrated-tasks.map;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
......@@ -51,6 +56,9 @@ server {
}
location ~ ^/task/(?<task_id>[0-9]+) {
if ($redirect != "") {
return 302 $redirect;
}
rewrite ^/task/[0-9]+$ /index.php?do=details&task_id=$task_id last;
rewrite ^/task/[0-9]+/comment(?<comment_id>[0-9]+)$ /index.php?do=details&task_id=$task_id&comment=$comment_id last;
rewrite ^/task/[0-9]+/depends$ /index.php?do=depends&task_id=$task_id last;
......
......@@ -34,6 +34,9 @@
- name: create auth directory
file: state=directory path=/etc/nginx/auth owner=root group=root mode=0755
- name: create maps directory
file: state=directory path=/etc/nginx/maps owner=root group=root mode=0755
- name: create default nginx log directory
file: state=directory path=/var/log/nginx/default owner=root group=root mode=0755
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment