Pour le blog, c'est directement Gandi qui fourni le certificat SSL "gratuitement" avec leur vps.

Pour la galerie photo, j'utilise Let’s Encrypt

certbot certonly --email ******* --webroot -w /var/lib/letsencrypt/ -d thesystem.fr,fanch.thesystem.fr

Puis ensuite dans Apache:

SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/thesystem.fr/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/thesystem.fr/privkey.pem"

Pour la configuration Apache complète de Nextcloud:

<IfModule mod_alias.c>
    Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>

<Directory /usr/share/webapps/nextcloud/>
    Options FollowSymlinks
    AllowOverride all
    Require all granted
    php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/nextcloud/:/etc/webapps/nextcloud:/home/Space/NextCloud/Data"
</Directory>

<VirtualHost *:443>
    ServerAdmin ********
    DocumentRoot /usr/share/webapps/nextcloud
    ServerName fanch.thesystem.fr
    ErrorLog /var/log/httpd/nextcloud-error_log
    CustomLog /var/log/httpd/nextcloud-access_log common

    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/thesystem.fr/fullchain.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/thesystem.fr/privkey.pem"
</VirtualHost>