Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes | ||
technique:gravmultisite [2017/11/27 00:48] – [Installation du plugin admin] lolo | technique:gravmultisite [2020/04/11 02:26] – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 12: | Ligne 12: | ||
< | < | ||
+ | oIWIKIo | ||
apt install nginx php-fpm php-mbstring php-cli php-opcache php-xml php-zip php-gd php-curl php-apcu php-yaml | apt install nginx php-fpm php-mbstring php-cli php-opcache php-xml php-zip php-gd php-curl php-apcu php-yaml | ||
</ | </ | ||
- | Récupération de l' | + | Récupération de l' |
On récupére ce qu'on veut sur le serveur et on l' | On récupére ce qu'on veut sur le serveur et on l' | ||
< | < | ||
+ | oIWIKIo | ||
wget https:// | wget https:// | ||
mv latest grav admin-v1.2.3.zip | mv latest grav admin-v1.2.3.zip | ||
Ligne 39: | Ligne 41: | ||
==== Modification du Virtualhost ==== | ==== Modification du Virtualhost ==== | ||
- | Grav est sympa et nous propose des [[https:// | + | Grav est sympa et nous propose des [[https:// |
J'ai prix [[https:// | J'ai prix [[https:// | ||
Ligne 46: | Ligne 48: | ||
< | < | ||
+ | oIWIKIo | ||
ln -s / | ln -s / | ||
</ | </ | ||
Ligne 73: | Ligne 76: | ||
</ | </ | ||
- | Et on se loggue sur l' | + | Et on se loggue sur l' |
Et ça marche ! On a là un beau site statique qu'on peut modifier à la main depuis le serveur. | Et ça marche ! On a là un beau site statique qu'on peut modifier à la main depuis le serveur. | ||
Ligne 98: | Ligne 101: | ||
Par contre, il faut maintenant s' | Par contre, il faut maintenant s' | ||
- | |||
==== La configuration multi-sites ==== | ==== La configuration multi-sites ==== | ||
Ligne 129: | Ligne 131: | ||
<?php | <?php | ||
/** | /** | ||
- | * Multisite setup for sub-directories or path based | + | * Multisite setup for sub-directories or path based |
- | * URLs for subsites. | + | * URLs for subsites. |
- | * | + | * |
- | * DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING! | + | * DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING! |
- | */ | + | */ |
+ | /** | ||
+ | Code corrigé par Romain : | ||
+ | Au lieu de : | ||
use GravCommonFilesystemFolder; | use GravCommonFilesystemFolder; | ||
- | |||
// Get relative path from Grav root. | // Get relative path from Grav root. | ||
$path = isset($_SERVER[' | $path = isset($_SERVER[' | ||
? $_SERVER[' | ? $_SERVER[' | ||
: Folder:: | : Folder:: | ||
+ | */ | ||
+ | /** Remplacer par */ | ||
+ | use Grav\Common\Filesystem\Folder; | ||
+ | |||
+ | // Get relative path from Grav root. | ||
+ | // $path = isset($_SERVER[' | ||
+ | // ? $_SERVER[' | ||
+ | // : Folder:: | ||
+ | |||
+ | // FIX: nginx bug Romain ? | ||
+ | $path = $_SERVER[' | ||
// Extract name of subsite from path | // Extract name of subsite from path | ||
Ligne 151: | Ligne 166: | ||
} | } | ||
- | // Prefix all pages with the name of the subsite | + | //Extract name of subsite from path\ $name = Folder:: |
- | $container[' | + | return []; |
+ | } // | ||
+ | $container[' | ||
return [ | return [ | ||
- | | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | | + | ' |
- | | + | ' |
- | | + | '' |
- | | + | ] |
- | ] | + | ] |
- | ] | + | ] |
- | ] | + | ] |
]; | ]; | ||
</ | </ | ||
Ligne 174: | Ligne 191: | ||
bin/gpm list # liste les commandes | bin/gpm list # liste les commandes | ||
bin/gpm update # met à jour le site | bin/gpm update # met à jour le site | ||
- | bin/gpm selfupgrade -f #mise à jour auto | + | bin/gpm selfupgrade -f #m<font inherit/ |
bin/gpm install nomduplugin # instalaltion d'un plugin | bin/gpm install nomduplugin # instalaltion d'un plugin | ||
bin/gpm install admin # | bin/gpm install admin # | ||
Ligne 184: | Ligne 201: | ||
bin/plugin admin help #aide sur un plugin | bin/plugin admin help #aide sur un plugin | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | bin/plugin login newuser -u joeuser -e joeuser@grav.org -P b -N "Joe User" -t "Site Administrator" | ||
+ | </ | ||
+ | |||
+ | === Mise à jour sur serveur de Prod === | ||
+ | |||
+ | < | ||
+ | cd / | ||
+ | sudo -u radios / | ||
+ | sudo -u radios / | ||
+ | </ | ||
+ | |||
+ | ===== ===== | ||
===== Côté client ===== | ===== Côté client ===== |