{"id":1887,"date":"2015-12-15T18:07:57","date_gmt":"2015-12-15T17:07:57","guid":{"rendered":"https:\/\/www.fanjoe.be\/?p=1887"},"modified":"2015-12-15T18:07:57","modified_gmt":"2015-12-15T17:07:57","slug":"nginx-wordpress-permaliens-flux-rss","status":"publish","type":"post","link":"https:\/\/www.fanjoe.be\/?p=1887","title":{"rendered":"Nginx : WordPress \/ permaliens \/ flux RSS"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>Il y a quelques temps, <a href=\"https:\/\/twitter.com\/xhark\" target=\"_blank\">xhark<\/a> me signalait une erreur sur mon flux RSS :<\/p>\n<blockquote class=\"twitter-tweet\" lang=\"fr\">\n<p dir=\"ltr\" lang=\"et\"><a href=\"https:\/\/twitter.com\/DidierCovassin\">@DidierCovassin<\/a> Hello, ton RSS est en erreur 500 <a href=\"https:\/\/t.co\/4LnqhNLyYR\">https:\/\/t.co\/4LnqhNLyYR<\/a> ?<\/p>\n<p>\u2014 xhark (@xhark) <a href=\"https:\/\/twitter.com\/xhark\/status\/670794578522411008\">29 Novembre 2015<\/a><\/p><\/blockquote>\n<p><script src=\"\/\/platform.twitter.com\/widgets.js\" async=\"\" charset=\"utf-8\"><\/script><\/p>\n<h1>Les probl\u00e8mes<\/h1>\n<p>Apr\u00e8s quelques recherches, je me suis aper\u00e7u que 2 erreurs s\u2019enchev\u00eatraient :<\/p>\n<h2>Erreur 500<\/h2>\n<p>Tout d&rsquo;abord, dans la configuration de Nginx, j&rsquo;avais :<\/p>\n<pre>location \/ {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try_files $uri $uri\/ \/index.html;\r\n}<\/pre>\n<p>Au lieu de :<\/p>\n<pre>location \/ {\r\n        try_files $uri $uri\/ \/index.php?args;\r\n}<\/pre>\n<p>Ce premier probl\u00e8me retournait une erreur 500.<\/p>\n<h2>Permaliens<\/h2>\n<p>Le second probl\u00e8me \u00e9tait li\u00e9 aux permaliens.<\/p>\n<p>WordPress &gt; R\u00e9glages &gt; Permaliens :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1889\" src=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-01.png\" alt=\"Erreur500-Permaliens-01\" width=\"324\" height=\"405\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-01.png 324w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-01-140x175.png 140w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-01-300x375.png 300w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/p>\n<p>Dans mon cas, je n&rsquo;utilise pas les permaliens :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1891\" src=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02-620x292.png\" alt=\"Erreur500-Permaliens-02\" width=\"620\" height=\"292\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02-620x292.png 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02-175x82.png 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02-300x141.png 300w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02-768x362.png 768w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-02.png 771w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>Le flux rss est donc accessible \u00e0 cette adresse : <a href=\"https:\/\/www.fanjoe.be\/?feed=rss2\" target=\"_blank\">https:\/\/www.fanjoe.be\/?feed=rss2<\/a><\/p>\n<p>Et il n&rsquo;est pas possible de s&rsquo;y connecter via ces raccourcis, actifs uniquement lors de l&rsquo;utilisation des permaliens :<\/p>\n<ul>\n<li><a href=\"https:\/\/www.fanjoe.be\/feed\/\" target=\"_blank\">https:\/\/www.fanjoe.be\/feed\/<\/a><\/li>\n<li><a href=\"https:\/\/www.fanjoe.be\/rss\/\" target=\"_blank\">https:\/\/www.fanjoe.be\/rss\/<\/a><\/li>\n<li><a href=\"https:\/\/www.fanjoe.be\/rss2\/\" target=\"_blank\">https:\/\/www.fanjoe.be\/rss2\/<\/a><\/li>\n<li><a href=\"https:\/\/www.fanjoe.be\/rdf\/\" target=\"_blank\">https:\/\/www.fanjoe.be\/rdf\/<\/a><\/li>\n<li><a href=\"https:\/\/www.fanjoe.be\/atom\/\" target=\"_blank\">https:\/\/www.fanjoe.be\/atom\/<\/a><\/li>\n<\/ul>\n<p>Pour rem\u00e9dier \u00e0 cela sans changer ma configuration WordPress, j&rsquo;ai ajout\u00e9 ces lignes dans le fichier de configuration de Nginx :<\/p>\n<p>Sous ces lignes :<\/p>\n<pre>location \/ {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try_files $uri $uri\/ \/index.php?args;\r\n}<\/pre>\n<p>J&rsquo;ai ajout\u00e9 :<\/p>\n<pre>rewrite ^\/feed\/$ \/?feed=rss;\r\nrewrite ^\/rss\/$ \/?feed=rss;\r\nrewrite ^\/rss2\/$ \/?feed=rss2;\r\nrewrite ^\/rdf\/$ \/?feed=rdf;\r\nrewrite ^\/atom\/$ \/?feed=atom;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction <\/p>\n<p>Il y a quelques temps, <a href=\"https:\/\/twitter.com\/xhark\" target=\"_blank\">xhark<\/a> me signalait une erreur sur mon flux RSS :<\/p>\n<p dir=\"ltr\"... \n\n","protected":false},"author":1,"featured_media":1892,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10,3,173,12],"tags":[221,51,220,219,70],"class_list":["post-1887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geek","category-informatique","category-linux","category-raspberrypi","tag-erreur-500","tag-nginx","tag-permaliens","tag-rss","tag-wordpress","end"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2015\/12\/Erreur500-Permaliens-00.jpg","_links":{"self":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts\/1887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1887"}],"version-history":[{"count":0,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts\/1887\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/media\/1892"}],"wp:attachment":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}