Outils pour utilisateurs

Outils du site


doc:formations:hebergement:service_non_publie:kanboard

Installation de kanboard

apt install kanboard php-pgsql
mkdir -p /home/kanboard/cache /home/kanboard/data /home/kanboard/files /home/kanboard/plugins /home/kanboard/uploads
chown -R www-data:www-data /home/kanboard
 
vi /etc/postgresql/15/main/pg_hba.conf
# Ajouter *AVANT* la ligne local/all/all:
# local   kanboard        kanboard                                md5
 
systemctl restart postgresql
 
sudo -u postgres createuser -P kanboard
 
su - postgres
psql -c "CREATE DATABASE kanboard with owner kanboard;"
psql -c "GRANT ALL PRIVILEGES ON DATABASE kanboard TO kanboard;"
psql -U kanboard -d kanboard -a -f /usr/share/kanboard/app/Schema/Sql/postgres.sql 
 
vi /usr/share/kanboard/config.php

Correctif: bug de logout, cf. https://github.com/kanboard/kanboard/pull/5309/files

Attention, le plugin "backlog" empêche le déplacement des taches dans les colonnes (bug CSRF).

Config nginx locale:

server {
	listen       81;
	server_name  kan.example.com;
	index        index.php;
	root         /usr/share/kanboard;
	client_max_body_size 512M;

	access_log /var/log/nginx/kan.valorhiz-webservices.com.access.log;
	error_log /var/log/nginx/kan.valorhiz-webservices.com.error.log warn;

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

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

	location ~* ^.+\.(log|sqlite)$ {
		return 404;
	}

	location ~ /\.ht {
		return 404;
	}

	location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
		log_not_found off;
		expires 7d;
		etag on;
	}

	gzip on;
	gzip_comp_level 3;
	gzip_disable "msie6";
	gzip_vary on;
	gzip_types
		text/javascript
		application/javascript
		application/json
		text/xml
		application/xml
		application/rss+xml
		text/css
		text/plain;
}

Proxy nginx pour renvoyer vers un kanboard local:

server {
        server_name kan.valorhiz-webservices.com;
        client_max_body_size 512M;
        listen 80;

        root /home/www/html;
        error_log /var/log/nginx/kan.valorhiz-webservices.error.log error;
        access_log /dev/null;

        index index.php index.html index.htm index.nginx-debian.html;

        location /.well-known/acme-challenge/ {
                alias /var/www/html/.well-known/acme-challenge/;
        }

	#rewrite ^/$ /kanboard/;

        location / {
                proxy_pass http://10.168.1.2:81;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto https;
                proxy_redirect off;
        }
}
doc/formations/hebergement/service_non_publie/kanboard.txt · Dernière modification : 2025/03/10 14:14 de jeremie