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 | ||
documentation:informatique:linux:apache:index [2019/01/22 14:10] – f1sls | documentation:informatique:linux:apache:index [2019/05/05 16:22] (Version actuelle) – f1sls | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Apache ====== | ====== Apache ====== | ||
+ | |||
+ | ===== Sécurité ===== | ||
+ | * https:// | ||
===== SSL / https ===== | ===== SSL / https ===== | ||
Ligne 137: | Ligne 140: | ||
===== Redirection http ➡ https ===== | ===== Redirection http ➡ https ===== | ||
+ | [[https:// | ||
==== Redirect HTTP to HTTPS on Apache Using .htaccess File ==== | ==== Redirect HTTP to HTTPS on Apache Using .htaccess File ==== | ||
Ligne 164: | Ligne 168: | ||
The second is for the secure port 443. To redirect HTTP to HTTPS for all the pages of your website, first open the appropriate virtual host file. Then modify it by adding the configuration below. | The second is for the secure port 443. To redirect HTTP to HTTPS for all the pages of your website, first open the appropriate virtual host file. Then modify it by adding the configuration below. | ||
+ | < | ||
NameVirtualHost *:80 | NameVirtualHost *:80 | ||
< | < | ||
Ligne 169: | Ligne 174: | ||
| | ||
</ | </ | ||
+ | </ | ||
+ | < | ||
< | < | ||
| | ||
Ligne 176: | Ligne 183: | ||
# etc... | # etc... | ||
</ | </ | ||
+ | </ | ||
+ | |||
Save and close the file, then restart the HTTP sever like this. | Save and close the file, then restart the HTTP sever like this. | ||
+ | <code lang=" | ||
$ sudo systemctl restart apache2 | $ sudo systemctl restart apache2 | ||
$ sudo systemctl restart httpd | $ sudo systemctl restart httpd | ||
- | While the < | + | </ |
+ | |||
+ | While the '' |