Apache » Historique » Version 5
  Patrice Nadeau, 2014-10-26 15:05 
  
| 1 | 3 | Patrice Nadeau | h1. Apache | 
|---|---|---|---|
| 2 | 1 | Patrice Nadeau | |
| 3 | Serveur de page Web | ||
| 4 | |||
| 5 | --- | ||
| 6 | |||
| 7 | {{toc}} | ||
| 8 | |||
| 9 | 3 | Patrice Nadeau | h2. Installation | 
| 10 | 1 | Patrice Nadeau | |
| 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 | 5 | Patrice Nadeau | systemctl enable apache2.service | 
| 15 | 1 | Patrice Nadeau | # Démarrer Apache : | 
| 16 | 5 | Patrice Nadeau | systemctl start apache2.service | 
| 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 | 3 | Patrice Nadeau | h2. Serveurs virtuels | 
| 27 | 1 | Patrice Nadeau | |
| 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 | 4 | Patrice Nadeau | * *ServerName* : Le FQDN(Fully Qualified Domain Name) du serveur | 
| 37 | 1 | Patrice Nadeau | * *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 | 
