Site Tools


informatique:linux:alpine:serveur_web

This is an old revision of the document!


Alpine Linux - Installation d'un serveur web

On va faire simple et un peu sale : Apache2, PHP-FPM

Documentations

Apache2

Installer Apache2

Installer Apache2 :

apk add apache2

Démarrer le service et l'activer au démarrage :

rc-service apache2 start
rc-update add apache2

Configurer Apache

Comme on est jamais trop sûr, je vais faire une copie du fichier de conf d'Apache :

cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bak

Créer un dossier pour les configurations des vhost :

mkdir /etc/apache2/vhost.d

Modifier httpd.conf pour ajouter ce dossier. A la fin, ajouter :

IncludeOptional /etc/apache2/vhost.d/*.conf

Créer un fichier de conf Apache. Par exemple :

<VirtualHost *:80>
    ServerName erreur503.xyz
    DocumentRoot /var/www/erreur503.xyz
    <Directory /var/www/erreur503.xyz>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Redémarrer Apache2 :

rc-service apache2 restart
informatique/linux/alpine/serveur_web.1761683916.txt.gz · Last modified: by yahiko