# 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; } }