From 9bb8988d676bb071d1249ba60e61d2c150fcda69 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Thu, 22 Mar 2018 17:17:41 +0100 Subject: [PATCH] redirection http -> https --- HowtoNginx.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/HowtoNginx.md b/HowtoNginx.md index 1a87d09e..d3963dc3 100644 --- a/HowtoNginx.md +++ b/HowtoNginx.md @@ -278,6 +278,15 @@ server { } ~~~ +Ou globalement, de manière générale, on peut faire : + +~~~ + +if ($scheme = http) { + return 301 https://$server_name$request_uri; +} +~~~ + ### Bloquer selon adresse IP Le but est de bloquer par adresse IP et de rediriger vers une page « Vous êtes bloqués ».