summarylogtreecommitdiffstats
path: root/kanboard-nginx.conf
blob: c9e456362a9edf6acc061ecd5079eb45ed59c12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Example configuration for a dedicated kanboard site
server {

listen 80;
server_name kanboard.domain.tld;
root /usr/share/webapps/kanboard;
index index.php index.html;

location / {
	try_files $uri $uri/ /index.php$is_args$args;

# If Kanboard is under a subfolder
# try_files $uri $uri/ /kanboard/index.php;
}

location ~ \.php$ {
	try_files $uri =404;
	fastcgi_split_path_info ^(.+\.php)(/.+)$;
	fastcgi_pass unix:/var/run/php5-fpm.sock;
	fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	fastcgi_index index.php;
	include fastcgi_params;
}

# Deny access to the directory data
location ~* /data {
	deny all;
	return 404;
}

# Deny access to .htaccess
location ~ /\.ht {
	deny all;
	return 404;
}