# Example configuration for running kanboard in a subdirectory, called kanbooard, on an existing site location /kanboard { root /usr/share/webapps; access_log /var/log/nginx/kanboard_access.log; error_log /var/log/nginx/kanboard_error.log; index /kanboard/index.php /kanboard/index.html; #try_files $uri $uri/ /index.php$is_args$args try_files $uri $uri/ /kanboard/index.php; # 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 ~ /(.+\.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 $document_root$fastcgi_script_name; fastcgi_index index.php; } }