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 | ||
| web:server [2023/03/01 15:46] – [Xampp] jcheron | web:server [2023/09/21 14:27] (Version actuelle) – jcheron | ||
|---|---|---|---|
| Ligne 25: | Ligne 25: | ||
| * Lamp Linux | * Lamp Linux | ||
| - | ==== Xampp ==== | + | ===== Xampp ===== |
| - | === Installation === | + | ==== Installation |
| * Télécharger Xampp depuis https:// | * Télécharger Xampp depuis https:// | ||
| * Exécuter l' | * Exécuter l' | ||
| <WRAP important 600px round> | <WRAP important 600px round> | ||
| - | Pour windows, si le dossier Xampp n'est pas à la racine du disque c: '' | + | Pour windows, si le dossier Xampp n'est pas à la racine du disque c: '' |
| + | il est nécessaire d' | ||
| <sxh bash; | <sxh bash; | ||
| setup_xampp | setup_xampp | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== Configuration/ | ||
| + | |||
| + | Le dossier racine par défaut (root) d' | ||
| + | |||
| + | La mise en place de **virtualhosts** permet de spécifier des localisations et noms DNS pour chaque site hébergés : | ||
| + | |||
| + | === Enregistrement DNS local === | ||
| + | |||
| + | Pour ajouter le nom **dev.local** dans le fichier **hosts** de votre machine : | ||
| + | |||
| + | Ajouter la ligne suivante dans le fichier '' | ||
| + | <sxh bash; | ||
| + | 127.0.0.1 dev.local | ||
| + | </ | ||
| + | |||
| + | |||
| + | Tester la résolution DNS : | ||
| + | |||
| + | <sxh bash; | ||
| + | ping dev.local | ||
| + | </ | ||
| + | |||
| + | === Virtualhosts === | ||
| + | Les virtualhosts sont configurés dans '' | ||
| + | |||
| + | Ajouter un vhost pour préserver l' | ||
| + | |||
| + | <sxh plain; | ||
| + | < | ||
| + | DocumentRoot " | ||
| + | ServerName 127.0.0.1 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Ajouter un vhost par name pour **dev.local** : | ||
| + | |||
| + | <wrap important> | ||
| + | Penser à changer le dossier '' | ||
| + | </ | ||
| + | |||
| + | |||
| + | <sxh plain; | ||
| + | < | ||
| + | DocumentRoot " | ||
| + | ServerName dev.local | ||
| + | ErrorLog " | ||
| + | CustomLog " | ||
| + | < | ||
| + | Require all granted | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Créer le fichier **index.html** à la racine de votre dossier (utilisé comme **DirectoryIndex**). | ||
| + | |||
| + | <sxh html; | ||
| + | < | ||
| + | <html lang=" | ||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta name=" | ||
| + | <meta http-equiv=" | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Redémarrer Apache et tester à l' | ||