samedi 10 novembre 2018

Piwigo on server

So I'm reinstalling Piwigo and stuff on my little server this time.

Software

sudo tasksel
Select LAMP server, OK -> install 28 packages or so.  Test: http://kid2.lan/ (OK: apache default page).

sudo apt install php7.2-mbstring php7.2-gd php7.2-mysql
Change the following in  /etc/php/7.2/apache2/php.ini :
upload_max_filesize = 20M
post_max_size = 20M
max_file_uploads = 99

Database

Create piwigo.sql script with the necessary CREATE DATABASE and so on.
mysql -u root -p < /home/luc/Documents/Config/piwogo.sql

Piwigo

cd /tmp && wget -O piwigo.zip \
http://piwigo.org/download/dlcounter.php?code=latest
unzip piwigo.zip
sudo mv piwigo /var/www/html/
sudo chown -R www-data:www-data /var/www/html/piwigo/
sudo chmod -R 755 /var/www/html/piwigo/

Apache configuration

sudo vi /etc/apache2/sites-available/piwigo.conf

Create this file as in previous blog entry, but on port 80 and without the SSL stuff for the moment.  We want to init Piwigo before, but you could do it after the SSL/HTTPS configuration too I guess.

Piwigo initialization

Goto http://kid2.lan/piwigo/ and the initialization script starts.  Test under HTTP for the time being.

SSL (HTTPS) configuration

Install certbot:
sudo apt install certbot
The rest of the instructions for using certbot it at :
https://desec.io/#!/en/docs/certbot

Apparently certbot needs curl to be installed, but I had to first upgrade urbackup-server to 2.2.11 to remove a dependency on libcurl3 from urbackup-server-2.2.7 (otherwise installing curl would have removed urbackup-server).
When the certificate was received, I just changed piwigo.conf to activate the SSL stuff, and also had to enable the Apache ssl module:

sudo vi /etc/apache2/sites-available/piwigo.conf
sudo a2enmod ssl







Aucun commentaire: