Outils pour utilisateurs

Outils du site


test_de_grav_pour_le_site_de_caliban

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
test_de_grav_pour_le_site_de_caliban [2019/10/15 08:25] – [Sources] simontest_de_grav_pour_le_site_de_caliban [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1
Ligne 1: Ligne 1:
-====== Test de Grav pour le site de Caliban ====== 
  
-<code bash> 
-$ 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/ 
-</code> 
- 
-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...) 
-<code bash> 
-root@grav:/var/www/html# apt install php7.3 php7.3-fpm php7.3-mbstring php7.3-zip php7.3-xml php7.3-gd php7.3-curl 
- 
-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 
-</code> 
- 
-On peut récupérer la configuration nginx par défaut : [[https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf|https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf]] 
-<code bash> 
-root@grav:/var/www/html# vim /etc/nginx/sites-enabled/default 
-</code> 
- 
-À changer dans la configuration : 
-<code bash> 
-(...) 
-    root /var/www/html; 
-(...) 
-        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; 
-(...) 
-</code> 
- 
-On relance nginx : 
-<code bash> 
-root@grav:/var/www/html# systemctl reload nginx 
-</code> 
- 
-{{ ::capture_du_2019-10-10_16-38-39-grav.png?400 |}} 
- 
-{{ ::screenshot_2019-10-10_dashboard_grav.png?400 |}} 
- 
-===== Ajouter un utilisateur ===== 
-Il faut le faire depuis la ligne de commande (source: [[https://learn.getgrav.org/16/admin-panel/faq|https://learn.getgrav.org/16/admin-panel/faq]]) 
-<code bash> 
-root@grav:/var/www/html# bin/plugin login newuser 
-Creating new user 
- 
-Enter a username: fred 
-Enter a password:  
-Repeat the password:  
-Enter an email:   info@caliban.be 
-Please choose a set of permissions: 
-  [a] Admin Access 
-  [s] Site Access 
-  [b] Admin and Site Access 
- > a 
-Enter a fullname: Fred 
-Enter a title:    Site Administrator 
-Please choose the state for the account: 
-  [enabled ] Enabled 
-  [disabled] Disabled 
- > enabled 
- 
-Success! User fred created. 
-</code> 
- 
-Les utilisateurs créés sont dans le dossier ''user/accounts/'' 
-<code bash> 
-root@grav:/var/www/html/user/accounts# ls 
-caliban.yaml  fred.yaml  micmac.yaml  nico.yaml  simon.yaml 
-</code> 
-===== Problèmes rencontrés ===== 
-==== Error 500 ==== 
-Il y a apparemment un problème avec le thème qu'on a testé.  
- 
-J'ai résolu l'erreur avec ce script qui remet les bons droits :  
-<code bash> 
-root@grav:/var/www/html# cat script.sh  
-#!/bin/sh 
-chown -R www-data:www-data . 
-find . -type f | xargs chmod 664 
-find ./bin -type f | xargs chmod 775 
-find . -type d | xargs chmod 775 
-find . -type d | xargs chmod +s 
- 
-root@grav:/var/www/html# chmod +x script.sh  
- 
-root@grav:/var/www/html# ./script.sh  
-</code> 
- 
-J'ai désactivé le thème pour voir si le problème vient bien de là. 
- 
-===== Sources ===== 
-  * [[https://learn.getgrav.org/16/basics/installation|Installation de Grav 1.6 (learn.getgrav.org)]] 
test_de_grav_pour_le_site_de_caliban.1571127903.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)