Ceci est basé sur un serveur crée via Gandicloud VPS.

commencer par un

sudo apt-get update  && sudo apt upgrade

sudo apt install php apache2 mysql-server unzip

Configuration apache2 et mysql-serveur

Décommenter le directory /srv/ dans /etc/apache2/apache.conf (pour mettre les sites dans /srv/)

<Directory /srv/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

et redémarrer apache

sudo systemctl restart apache2
installer un hote virtuel qui pointe sur /srv/xxxx
y mettre un fichier index.php contenant
<?php
phpinfo();
?>
et tester l'affichage (ne pas oublier de rediriger les dns dessus...)

Mysql

sudo mysql
create user utilisateur@localhost identified by 'motdepasse';
GRANT ALL ON *.* TO 'acrona'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
QUIT;
faire un sudo apt install phpymyadmin
(bien penser à bien cocher apache (pas coché par défaut)
Monter /démonter un disque externe
Parfois, lorsqu'on attache un disque via l'interface Gandi, on ne voit toujours pas le disque sur le serveur. Il faut alors le monter manuellement (après un redémarrage/reboot si nécessaire)
sudo mount /dev/xvdk /srv/"$(blkid -o value -s LABEL /dev/xvdk)"