summarylogtreecommitdiffstats
path: root/kanboard-nginx-subdir.conf
diff options
context:
space:
mode:
Diffstat (limited to 'kanboard-nginx-subdir.conf')
-rw-r--r--kanboard-nginx-subdir.conf40
1 files changed, 40 insertions, 0 deletions
diff --git a/kanboard-nginx-subdir.conf b/kanboard-nginx-subdir.conf
new file mode 100644
index 000000000000..a9dcd7c3888b
--- /dev/null
+++ b/kanboard-nginx-subdir.conf
@@ -0,0 +1,40 @@
+# Example configuration for running kanboard in a subdirectory, called kanbooard, on an existing site
+
+location /kanboard {
+ alias /usr/share/webapps/kanboard;
+
+ access_log /var/log/nginx/kanboard_access.log;
+ error_log /var/log/nginx/kanboard_error.log;
+ index index.php index.html;
+
+ #try_files $uri $uri/ /index.php$is_args$args;
+
+ # Deny access to the directory data
+ location ~ ^/kanboard/data/ {
+ deny all;
+ return 404;
+ }
+
+ # Deny access to .htaccess
+ location ~ /kanboard/\.ht {
+ deny all;
+ return 404;
+ }
+
+ location ~ /kanboard/(config|config.default|kanboard).php$
+ {
+ deny all;
+ return 404;
+ }
+
+ location ~ /kanboard/(.+\.php)$ {
+ include fastcgi_params;
+ try_files $uri =404;
+ fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ fastcgi_param SCRIPT_FILENAME /usr/share/webapps/$fastcgi_script_name;
+ fastcgi_index index.php;
+ }
+}
+
+