Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
fr:install:apache_config_impilo [2018/05/02 16:14] – modification externe 127.0.0.1 | fr:install:apache_config_impilo [2021/05/29 15:35] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== Hôte virtuel Apache pour Impilo ====== | ||
+ | **NOTE**: Mise à jour pour Ubuntu 18.04 | ||
+ | |||
+ | Idéalement, | ||
+ | |||
+ | * Premièrement, | ||
+ | <sxh bash> | ||
+ | % cd / | ||
+ | % sudo mkdir ./wiki | ||
+ | % sudo chown -R www-data: | ||
+ | </ | ||
+ | |||
+ | * Deuxièmement, | ||
+ | <sxh bash> | ||
+ | % cd / | ||
+ | % sudo cp 000-default.conf impilo.conf | ||
+ | </ | ||
+ | |||
+ | * Ensuite, il faut modifier le fichier '' | ||
+ | <sxh apache> | ||
+ | < | ||
+ | # The ServerName directive sets the request scheme, hostname and port that | ||
+ | # the server uses to identify itself. This is used when creating | ||
+ | # redirection URLs. In the context of virtual hosts, the ServerName | ||
+ | # specifies what hostname must appear in the request' | ||
+ | # match this virtual host. For the default virtual host (this file) this | ||
+ | # value is not decisive as it is used as a last resort host regardless. | ||
+ | # However, you must set it for any further virtual host explicitly. | ||
+ | # | ||
+ | |||
+ | ServerAdmin webmaster@localhost | ||
+ | # On change la localisation du point d' | ||
+ | # | ||
+ | DocumentRoot / | ||
+ | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | ||
+ | # error, crit, alert, emerg. | ||
+ | # It is also possible to configure the loglevel for particular | ||
+ | # modules, e.g. | ||
+ | #LogLevel info ssl:warn | ||
+ | |||
+ | ErrorLog ${APACHE_LOG_DIR}/ | ||
+ | CustomLog ${APACHE_LOG_DIR}/ | ||
+ | |||
+ | # For most configuration files from conf-available/, | ||
+ | # enabled or disabled at a global level, it is possible to | ||
+ | # include a line for only one particular virtual host. For example the | ||
+ | # following line enables the CGI configuration for this host only | ||
+ | # after it has been globally disabled with " | ||
+ | #Include conf-available/ | ||
+ | |||
+ | # Addition pour redirection vers HTTPS | ||
+ | # To force redirect toward https from http | ||
+ | RewriteEngine On | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https:// | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | * Remarquer que la ligne '' | ||
+ | |||
+ | * Il nous reste à utiliser HTTPS par-dessus HTTP pour la communication. Par principe, comme un wiki s' | ||
+ | |||
+ | <sxh bash> | ||
+ | # Ceci créera un certificat SSL on-the-fly | ||
+ | % sudo apt-get install ssl-cert | ||
+ | # Il faut ensuite parametrer Apache | ||
+ | % sudo a2enmod ssl | ||
+ | % sudo a2enmod rewrite | ||
+ | % cd / | ||
+ | % sudo cp default-ssl.conf impilo-ssl.conf | ||
+ | </ | ||
+ | |||
+ | * Dans le fichier '' | ||
+ | |||
+ | <sxh bash> | ||
+ | # Remarque l' | ||
+ | # | ||
+ | DocumentRoot / | ||
+ | </ | ||
+ | |||
+ | * Tout le reste du fichier devrait resté tel quel car il est fait pour reconnaitre le certificat SSL crée par l' | ||
+ | |||
+ | * Il faut maintenant modifier le fichier ''/ | ||
+ | <sxh apache> | ||
+ | # Lorsque vous trouverez cette section... | ||
+ | # À commenter!! | ||
+ | #< | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #</ | ||
+ | |||
+ | # Nouvel addition pour notre installation | ||
+ | < | ||
+ | Options Indexes FollowSymLinks | ||
+ | AllowOverride None | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | # Ne nous concerne pas... | ||
+ | #< | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #</ | ||
+ | </ | ||
+ | |||
+ | * Il faut maintenant dire au système de faire le changement de configuration du site par défaut. À partir de maintenant, l' | ||
+ | <sxh bash> | ||
+ | % sudo a2dissite 000-default.conf | ||
+ | % sudo a2ensite impilo | ||
+ | % sudo a2ensite impilo-ssl.conf | ||
+ | % sudo / | ||
+ | </ |