PROJET AUTOBLOG


Planet-Libre

source: Planet-Libre

⇐ retour index

Thuban : Wallabag v2 sur OpenBSD

samedi 4 mars 2017 à 09:26

J'ai réussi à configurer wallabag V2 sur OpenBSD. Ça marche très bien, il fallait seulement lire la documentation donnée. Oui, je l'avoue, j'avais lu à l'arrache la première fois.
Voici donc un petit compte-rendu de la procédure à suivre. Bien entendu, cette partie sera ajoutée dans la prochaine version du guide sur l'auto-hébergement.

Wallabag permet de sauvegarder des pages web pour les
lire plus tard. On le décrit comme une application de "read-it-later". Voici comment l'installer.

On récupère wallabag dans le dossier /tmp :

$ cd /tmp
$ ftp https://wllbg.org/latest-v2-package && tar xvzf latest-v2-package

On installe wallabag dans /var/www/htdocs :

# mv /tmp/release* /var/www/htdocs/wallabag
# chown -R www:daemon /var/www/htdocs/wallabag

On peut désormais éditer le fichier /etc/httpd.conf afin d'ajouter une
section pour wallabag :

server "bag.exemple.net" {
        listen on * port 80
        block return 301 "https://$SERVER_NAME$REQUEST_URI"
}

server "bag.exemple.net" {
        listen on * tls port 443
        root "/htdocs/wallabag/web" 
        directory index app.php
        hsts
		tls {
			certificate "/etc/ssl/acme/votredomaine-fullchain.com.pem"
			key         "/etc/ssl/acme/private/votredomaine-privkey.com.pem"
		}

		# on bloque tous les scripts php sauf celui utile
        location "/*.php"          { block }

		# on reformate l'URL si besoin
        location match "^/[^(app.php)]/(.*)$" {
                block return 301 "https://$SERVER_NAME/app.php/%1"
        }
		location "/" {
                block return 301 "https://$SERVER_NAME/app.php/"
        }
		
		# On sert les pages
        location "/app.php/*" {
                fastcgi socket "/run/php-fpm.sock"
        }
}

Il ne vous reste plus qu'à relancer httpd avec rcctl reload httpd puis à aller sur votre site. Les identifiants par défaut sont wallabag/wallabag. Créez un nouveau compte ou modifiez ce dernier pour terminer l'installation.

Gravatar de Thuban
Original post of Thuban.Votez pour ce billet sur Planet Libre.