Apache » Historique » Version 2
Patrice Nadeau, 2014-10-18 17:21
| 1 | 1 | Patrice Nadeau | %{font-size:18pt}Apache% |
|---|---|---|---|
| 2 | |||
| 3 | Serveur de page Web |
||
| 4 | |||
| 5 | --- |
||
| 6 | |||
| 7 | {{toc}} |
||
| 8 | |||
| 9 | h1. Installation |
||
| 10 | |||
| 11 | > Le module _apache2-mod_php5_ n’a pas nécessairement déjà été installé. |
||
| 12 | <pre><code class="bash"> |
||
| 13 | zypper install apache2 apache2-mod_php5 |
||
| 14 | 2 | Patrice Nadeau | systemctl enable apache2.services |
| 15 | 1 | Patrice Nadeau | # Démarrer Apache : |
| 16 | 2 | Patrice Nadeau | systemctl start apache2.services |
| 17 | 1 | Patrice Nadeau | </code></pre> |
| 18 | |||
| 19 | Ouvrir dans le pare-feu : |
||
| 20 | <pre><code class="bash"> |
||
| 21 | yast firewall services add service=service:apache2 zone=EXT |
||
| 22 | </code></pre> |
||
| 23 | |||
| 24 | L’emplacement des fichier du serveur est _/srv/www/htdocs_. |
||
| 25 | |||
| 26 | h1. Serveurs virtuels |
||
| 27 | |||
| 28 | Si le fichier _/etc/apache2/vhosts.d/vhost.conf_ n'existe pas |
||
| 29 | <pre><code class="bash"> |
||
| 30 | cd /etc/apache2/vhosts.d/ |
||
| 31 | cp vhost.template vhost.conf |
||
| 32 | </code></pre> |
||
| 33 | |||
| 34 | Modifier les items suivants : |
||
| 35 | * *ServerAdmin* : L'adresse de courriel de l'administrateur |
||
| 36 | * *ServerName* : Le FQDN(Fully Qualified Domain Name) dur serveur |
||
| 37 | * *DocumentRoot* : L'emplacement des fichiers du site web |
||
| 38 | |||
| 39 | Relire la configuration d'Apache |
||
| 40 | <pre><code class="bash"> |
||
| 41 | syctemsctl reload apache2 |
||
| 42 | </code></pre> |
||
| 43 | |||
| 44 | Commandes |
||
| 45 | * apache2ctl -S : liste les serveurs virtuels |