Outils pour utilisateurs

Outils du site


test_de_grav_pour_le_site_de_caliban

Ceci est une ancienne révision du document !


Test de Grav pour le site de Caliban

$ sudo lxc-create -t download -n grav -- --dist debian --release buster --arch amd64
 
$ sudo lxc-start -n grav
 
$ sudo lxc-attach -n grav
 
root@grav:/# dpkg-reconfigure locales
(choose fr_BE.UTF-8 )
 
root@grav:/# apt update
 
root@grav:/# apt install nginx wget unzip
 
root@grav:/# cd /var/www/
 
root@grav:/var/www/# wget -O grav-admin-v1.6.16.zip https://getgrav.org/download/core/grav-admin/1.6.16
 
root@grav:/var/www# unzip grav-admin-v1.6.16.zip 
 
root@grav:/var/www# rm -r html/
 
root@grav:/var/www# mv grav-admin/ html/
 
root@grav:/var/www# chown -R www-data:www-data html/

Je voulais changer la configuration de Nginx au minimum mais il faut bien installer et activer PHP. (Et mince, il installe apache2 par défaut, faut le virer…)

root@grav:/var/www/html# apt install php7.3
 
root@grav:/var/www/html# apt remove apache2
 
root@grav:/var/www/html# rm /etc/systemd/system/apache2.service 
 
root@grav:/var/www/html# rm /etc/systemd/system/apache-htcacheclean.service 
 
root@grav:/var/www/html# systemctl daemon-reload

On peut récupérer la configuration nginx par défaut : https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf

root@grav:/var/www/html# vim /etc/nginx/sites-enabled/default

À changer dans la configuration :

(...)
    root /var/www/html;
(...)
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
(...)

root@grav:/var/www/html# systemctl reload nginx </code>

Sources

test_de_grav_pour_le_site_de_caliban.1570717867.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)