{"id":385,"date":"2020-08-16T19:24:02","date_gmt":"2020-08-16T17:24:02","guid":{"rendered":"https:\/\/antoinesaludo.fr\/?p=385"},"modified":"2020-08-16T19:24:02","modified_gmt":"2020-08-16T17:24:02","slug":"nginx-rediriger-les-requetes-http-en-https","status":"publish","type":"post","link":"https:\/\/antoinesaludo.fr\/?p=385","title":{"rendered":"Nginx : Rediriger les requ\u00eates HTTP en HTTPS"},"content":{"rendered":"\n<p>Pour rediriger les trafics HTTP en HTTPS avec Nginx rien de plus simple, il suffit de rajouter \u00e0 la fin du fichier :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/nginx\/nginx.conf\n\nif ($server_port = 80) {\n       rewrite ^\/(.*)$ https:\/\/www.antoinesaludo.fr\/$1 permanent;\n}<\/code><\/pre>\n\n\n\n<p>Il faut remplacer <strong>www.antoinesaludo.fr<\/strong> par votre propre nom de domaine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pour rediriger les trafics HTTP en HTTPS avec Nginx rien de plus simple, il suffit de rajouter \u00e0 la fin du fichier : Il faut remplacer www.antoinesaludo.fr par votre propre nom de domaine.<\/p>\n","protected":false},"author":1,"featured_media":386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10],"tags":[4,11],"class_list":["post-385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-nginx","tag-linux","tag-nginx"],"_links":{"self":[{"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/posts\/385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385"}],"version-history":[{"count":1,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions\/387"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=\/wp\/v2\/media\/386"}],"wp:attachment":[{"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antoinesaludo.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}