Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 727d520996 |
@@ -1,31 +1,19 @@
|
|||||||
# Prise en main
|
# Vhost
|
||||||
## Compétences requises:
|
|
||||||
|
|
||||||
* édition de fichier
|
Mettre en place le vhost _formation.opendoor.fr_ en respectant les conditions suivantes:
|
||||||
* gestion des utilisateurs et des groupes
|
|
||||||
* gestion des paquets
|
|
||||||
* gestion des services
|
|
||||||
|
|
||||||
## Références
|
Fichier de configuration: /etc/apache2/sites-available/formation.opendoor.fr.conf
|
||||||
|
|
||||||
* Apache extended status
|
|
||||||
## Instructions
|
|
||||||
|
|
||||||
La configuration se fera dans les règles de l'art via le fichier /etc/httpd/conf.d/formation.opendoor.fr.conf
|
|
||||||
|
|
||||||
Nom du serveur: formation.opendoor.fr
|
Nom du serveur: formation.opendoor.fr
|
||||||
|
|
||||||
Emplacement des fichiers web: /srv/formation/www
|
Emplacement des fichiers web: /srv/formation/www
|
||||||
|
|
||||||
|
Fichier /srv/formation/www/index.html contenant "Bienvenue sur formation.opendoor.fr"
|
||||||
|
|
||||||
Emplacement des logs d'accès: /srv/formation/logs
|
Emplacement des logs d'accès: /srv/formation/logs
|
||||||
|
|
||||||
|
Affichage des stats via url /status
|
||||||
|
|
||||||
|
Affichage de la config via url /config
|
||||||
|
|
||||||
|
|
||||||
## Validation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
|
|
||||||
# echo "Welcome on formation.opendoor.fr" > /srv/formation/www/index.html
|
|
||||||
# curl http://formation.opendoor.fr:52801/
|
|
||||||
Welcome on formation.opendoor.fr
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# this script is meant to be run by ansible
|
||||||
|
|
||||||
|
source /root/functions.sh
|
||||||
|
# check that alias has been tried
|
||||||
|
addHeader
|
||||||
|
fileMustExist /etc/httpd/conf.d/cours.opendoor.fr.conf
|
||||||
|
dirMustExist /srv/cours/www
|
||||||
|
dirMustExist /srv/cours/logs
|
||||||
|
pkgInstalled httpd
|
||||||
|
serviceIsEnabled httpd
|
||||||
|
serviceIsActive httpd
|
||||||
|
okIfCurl http://localhost/status "Apache Server Status for localhost"
|
||||||
|
okIfCurl http://localhost/config "strong>MPM Name"
|
||||||
Reference in New Issue
Block a user