Verified Commit 8f82c6f2 authored by Florian Pritz's avatar Florian Pritz
Browse files

kanboard: Set up url rewriting

Uses the nginx config from here:
https://kanboard.net/documentation/nice-urls



Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 8b0e06d3
...@@ -7,3 +7,4 @@ define('DB_HOSTNAME', 'localhost'); ...@@ -7,3 +7,4 @@ define('DB_HOSTNAME', 'localhost');
define('DB_NAME', '{{kanboard_db}}'); define('DB_NAME', '{{kanboard_db}}');
define('ENABLE_HSTS', false); define('ENABLE_HSTS', false);
define('ENABLE_URL_REWRITE', true);
...@@ -31,13 +31,29 @@ server { ...@@ -31,13 +31,29 @@ server {
root {{ kanboard_dir }}; root {{ kanboard_dir }};
location /data { index index.php;
deny all;
location / {
try_files $uri $uri/ /index.php$is_args$args;
} }
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
fastcgi_pass kanboard; fastcgi_pass kanboard;
} }
# Deny access to the directory data
location ~* /data {
deny all;
return 404;
}
# Deny access to .htaccess
location ~ /\.ht {
deny all;
return 404;
}
} }
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