Table des matières

Installation Apache, php, maria db, ...

Installation :

apt update && apt upgrade
apt install apache2
apt update
apt-cache search php
apt-cache search php7.0
apt install php7.0
apt install mariadb-server
mysql_secure_installation
mariadb
CREATE USER newuser@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO newuser@localhost WITH GRANT OPTION;
quit
mariadb
DROP USER newuser@localhost;
quit
apt install phpmyadmin

Sélectionner Apache2 avec espace.

Config apache ou erreur AH00558:

systemctl status apache2

Lorsque vous démarrez ou redémarrez votre serveur Apache sous Linux et que le message d’erreur ci-dessous apparaît, cela signifie que vous n’avez pas spécifié le nom de domaine ou l’IP à laquelle votre serveur doit répondre.

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

Il est très facile de résoudre ceci, je vais vous montrer comment, exécutez simplement ces commandes (testées sur Debian et Ubuntu):

sudo nano /etc/apache2/apache2.conf
ou
sudo nano /etc/apache2/httpd.conf
ServerName "VotreDomaine.com"

«VotreDomaine.com» peut également être remplacé par une adresse IP.

service apache2 restart
ou
systemctl restart apache2
systemctl status apache2
chmod 755 /var/www/html/
chown -R www-data:www-data /var/www/html/

Activer la réécriture d’adresse

a2enmod rewrite
nano /etc/apache2/apache2.conf
AllowOverride All
systemctl reload apache2