{"action":"created","comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments/61719781","id":61719781,"diff_hunk":"@@ -475,6 +475,37 @@ _________\n Actions à faire pour mettre en prod la version 18\n =================================================\n \n+Changements de configuration Nginx\n+----------------------------------\n+\n+Une réécriture complète de la configuration Nginx a été faite en béta ; il faut donc refléter les changements en prod.\n+\n+**Ces changements sont relativement lourds, donc une sauvegarde de `/etc/nginx` avant de faire quoi que ce soit n'est pas de trop. Ces changements doivent être fait *avant* la mise en prod, et tous les changements peuvent être fait sans aucun downtime, puisque l'ancienne configuration reste active tant que nginx n'est pas `reload`**\n+\n+Créer un dossier `/opt/zdsenv/webroot`, et y symlink toutes les resources statiques:\n+\n+```sh\n+mkdir /opt/zdsenv/webroot\n+cd /opt/zdsenv/webroot\n+ln -s ../ZesteDeSavoir/{static,media,errors,robots.txt} ./\n+```\n+\n+**Aussi symlink toutes les autres resources qui doivent être accessibles, type les fichiers de vérification de Gandi/des Google Webmaster Tools**\n+\n+Ensuite, le fichier `dhparam.pem` a été déplacé de `/etc/nginx/dhparam.pem` à `/etc/ssl/dhparam.pem`. Il faut donc le faire en prod (ou regénérer les dhparam via `openssl dhparam -out /etc/ssl/dhparam.pem 4096` ; cette commande peut prendre 2-3min)\n+\n+Enfin, la localisation des certificats a été modifiée pour qu'elle soit la même en beta et en prod. En beta, les fichiers ont été symlink, il faut donc faire de même en prod (ou les déplacer/copier), en mettant la chaine de certificat dans `/etc/ssl/certs/zds-live.crt` et la clé dans `/etc/ssl/private/zds-live.key`. **Voir la configuration nginx actuelle pour voir de quel fichiers il s'agit.**\n+\n+Une fois que ces changements sont fait, il faut copier la nouvelle configuration nginx dans `/etc/nginx`. Elle se trouve dans le dépot dans `doc/source/install/nginx/`.\n+\n+Les anciens fichier dans `sites-{enabled,available}/` et dans `conf.d/` peuvent être virés s'il y en a ; les autres fichiers qui sont la \"par défaut\" doivent rester la (même si `mimes.types` semble être le seul fichier indispensable)\n+\n+Symlink le fichier `zestedesavoir`: `ln -s ../sites-enabled/prod-redirect /etc/nginx/sites-available/`","path":"update.md","position":29,"original_position":29,"commit_id":"e34c6ce5db7355b8722874f4d5565c6f82705352","original_commit_id":"e34c6ce5db7355b8722874f4d5565c6f82705352","user":{"login":"Nodraak","id":4773741,"avatar_url":"https://avatars.githubusercontent.com/u/4773741?v=3","gravatar_id":"","url":"https://api.github.com/users/Nodraak","html_url":"https://github.com/Nodraak","followers_url":"https://api.github.com/users/Nodraak/followers","following_url":"https://api.github.com/users/Nodraak/following{/other_user}","gists_url":"https://api.github.com/users/Nodraak/gists{/gist_id}","starred_url":"https://api.github.com/users/Nodraak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nodraak/subscriptions","organizations_url":"https://api.github.com/users/Nodraak/orgs","repos_url":"https://api.github.com/users/Nodraak/repos","events_url":"https://api.github.com/users/Nodraak/events{/privacy}","received_events_url":"https://api.github.com/users/Nodraak/received_events","type":"User","site_admin":false},"body":"Ne devrait pas etre : Symlink le fichier `zestedesavoir`: `ln -s ../sites-enabled/zestedesavoir /etc/nginx/sites-available/` ?","created_at":"2016-05-02T09:29:09Z","updated_at":"2016-05-02T09:29:09Z","html_url":"https://github.com/zestedesavoir/zds-site/pull/3575#discussion_r61719781","pull_request_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575","_links":{"self":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments/61719781"},"html":{"href":"https://github.com/zestedesavoir/zds-site/pull/3575#discussion_r61719781"},"pull_request":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575"}}},"pull_request":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575","id":68509258,"html_url":"https://github.com/zestedesavoir/zds-site/pull/3575","diff_url":"https://github.com/zestedesavoir/zds-site/pull/3575.diff","patch_url":"https://github.com/zestedesavoir/zds-site/pull/3575.patch","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3575","number":3575,"state":"open","locked":false,"title":"Mise à jour de la configuration nginx","user":{"login":"sandhose","id":1549952,"avatar_url":"https://avatars.githubusercontent.com/u/1549952?v=3","gravatar_id":"","url":"https://api.github.com/users/sandhose","html_url":"https://github.com/sandhose","followers_url":"https://api.github.com/users/sandhose/followers","following_url":"https://api.github.com/users/sandhose/following{/other_user}","gists_url":"https://api.github.com/users/sandhose/gists{/gist_id}","starred_url":"https://api.github.com/users/sandhose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandhose/subscriptions","organizations_url":"https://api.github.com/users/sandhose/orgs","repos_url":"https://api.github.com/users/sandhose/repos","events_url":"https://api.github.com/users/sandhose/events{/privacy}","received_events_url":"https://api.github.com/users/sandhose/received_events","type":"User","site_admin":false},"body":"| Q                                   | R\r\n| ----------------------------------- | -------------------------------------------\r\n| Type de modification                | évolution\r\n| Ticket(s) (_issue(s)_) concerné(s)  | #3572 \r\n\r\nPfiou, c'est fait !\r\n\r\nDonc, pour résumer:\r\n\r\n - La conf est maintenant *strictement* identique entre la beta et la prod, à l'exception de la redirection en plus `www.zestedesavoir.com` -> `zestedesavoir.com` en prod.\r\n - Elle a été séparée en plein de petits fichiers\r\n - Il  y a maintenant un dossier `webroot/`, avec tous ce qui doit être servi en statique, ce qui simplifie grandement le fichier de conf\r\n - La maintenance s'active maintenant quand il y a un fichier `webroot/maintenance.html` de présent ; suffit donc de faire `ln -s errors/maintenance.html /opt/zdsenv/webroot/` pour l'activer, et `rm /opt/zdsenv/webroot/maintenance.html` pour la desactiver. Plus besoin de recharger nginx, et on profite du reste de la conf (headers, règles pour les robots, https, ...)\r\n\r\nVoir l'update.md pour le reste\r\n\r\nJ'ai aussi update Sphinx, puisqu'il permet de rajouter des légendes au blocs de code directement depuis la 1.3, ce qui m'a permis de rajouter des liens pour télécharger les différents fichiers de conf directement dans la doc.\r\n\r\n**J'ai mis sur la branche de la v18, mais il peut, et devrait être fait la maintenant, en dehors de la MEP, histoire d'alléger la MEP de la v18**\r\n\r\n### QA\r\n\r\n* Update Sphinx (`pip install -u requirements-dev.txt`)\r\n* Build la doc, et vérifier son contennu\r\n* Vérifiez les instruction ? La conf en question est déjà en beta","created_at":"2016-05-01T22:13:22Z","updated_at":"2016-05-02T09:29:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b31281b7049b7e2379875be029fe4a0c24740b0","assignee":{"login":"SpaceFox","id":5786268,"avatar_url":"https://avatars.githubusercontent.com/u/5786268?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceFox","html_url":"https://github.com/SpaceFox","followers_url":"https://api.github.com/users/SpaceFox/followers","following_url":"https://api.github.com/users/SpaceFox/following{/other_user}","gists_url":"https://api.github.com/users/SpaceFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceFox/subscriptions","organizations_url":"https://api.github.com/users/SpaceFox/orgs","repos_url":"https://api.github.com/users/SpaceFox/repos","events_url":"https://api.github.com/users/SpaceFox/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceFox/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones/31","html_url":"https://github.com/zestedesavoir/zds-site/milestones/Version%2018","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones/31/labels","id":1604052,"number":31,"title":"Version 18","description":"","creator":{"login":"SpaceFox","id":5786268,"avatar_url":"https://avatars.githubusercontent.com/u/5786268?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceFox","html_url":"https://github.com/SpaceFox","followers_url":"https://api.github.com/users/SpaceFox/followers","following_url":"https://api.github.com/users/SpaceFox/following{/other_user}","gists_url":"https://api.github.com/users/SpaceFox/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceFox/subscriptions","organizations_url":"https://api.github.com/users/SpaceFox/orgs","repos_url":"https://api.github.com/users/SpaceFox/repos","events_url":"https://api.github.com/users/SpaceFox/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceFox/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":69,"state":"open","created_at":"2016-02-24T22:33:37Z","updated_at":"2016-05-02T08:54:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575/commits","review_comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575/comments","review_comment_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3575/comments","statuses_url":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/e34c6ce5db7355b8722874f4d5565c6f82705352","head":{"label":"sandhose:update-conf-nginx","ref":"update-conf-nginx","sha":"e34c6ce5db7355b8722874f4d5565c6f82705352","user":{"login":"sandhose","id":1549952,"avatar_url":"https://avatars.githubusercontent.com/u/1549952?v=3","gravatar_id":"","url":"https://api.github.com/users/sandhose","html_url":"https://github.com/sandhose","followers_url":"https://api.github.com/users/sandhose/followers","following_url":"https://api.github.com/users/sandhose/following{/other_user}","gists_url":"https://api.github.com/users/sandhose/gists{/gist_id}","starred_url":"https://api.github.com/users/sandhose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandhose/subscriptions","organizations_url":"https://api.github.com/users/sandhose/orgs","repos_url":"https://api.github.com/users/sandhose/repos","events_url":"https://api.github.com/users/sandhose/events{/privacy}","received_events_url":"https://api.github.com/users/sandhose/received_events","type":"User","site_admin":false},"repo":{"id":20409732,"name":"zds-site","full_name":"sandhose/zds-site","owner":{"login":"sandhose","id":1549952,"avatar_url":"https://avatars.githubusercontent.com/u/1549952?v=3","gravatar_id":"","url":"https://api.github.com/users/sandhose","html_url":"https://github.com/sandhose","followers_url":"https://api.github.com/users/sandhose/followers","following_url":"https://api.github.com/users/sandhose/following{/other_user}","gists_url":"https://api.github.com/users/sandhose/gists{/gist_id}","starred_url":"https://api.github.com/users/sandhose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandhose/subscriptions","organizations_url":"https://api.github.com/users/sandhose/orgs","repos_url":"https://api.github.com/users/sandhose/repos","events_url":"https://api.github.com/users/sandhose/events{/privacy}","received_events_url":"https://api.github.com/users/sandhose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandhose/zds-site","description":"Dépot ZDS","fork":true,"url":"https://api.github.com/repos/sandhose/zds-site","forks_url":"https://api.github.com/repos/sandhose/zds-site/forks","keys_url":"https://api.github.com/repos/sandhose/zds-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandhose/zds-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandhose/zds-site/teams","hooks_url":"https://api.github.com/repos/sandhose/zds-site/hooks","issue_events_url":"https://api.github.com/repos/sandhose/zds-site/issues/events{/number}","events_url":"https://api.github.com/repos/sandhose/zds-site/events","assignees_url":"https://api.github.com/repos/sandhose/zds-site/assignees{/user}","branches_url":"https://api.github.com/repos/sandhose/zds-site/branches{/branch}","tags_url":"https://api.github.com/repos/sandhose/zds-site/tags","blobs_url":"https://api.github.com/repos/sandhose/zds-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandhose/zds-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandhose/zds-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandhose/zds-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandhose/zds-site/statuses/{sha}","languages_url":"https://api.github.com/repos/sandhose/zds-site/languages","stargazers_url":"https://api.github.com/repos/sandhose/zds-site/stargazers","contributors_url":"https://api.github.com/repos/sandhose/zds-site/contributors","subscribers_url":"https://api.github.com/repos/sandhose/zds-site/subscribers","subscription_url":"https://api.github.com/repos/sandhose/zds-site/subscription","commits_url":"https://api.github.com/repos/sandhose/zds-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandhose/zds-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandhose/zds-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandhose/zds-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandhose/zds-site/contents/{+path}","compare_url":"https://api.github.com/repos/sandhose/zds-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandhose/zds-site/merges","archive_url":"https://api.github.com/repos/sandhose/zds-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandhose/zds-site/downloads","issues_url":"https://api.github.com/repos/sandhose/zds-site/issues{/number}","pulls_url":"https://api.github.com/repos/sandhose/zds-site/pulls{/number}","milestones_url":"https://api.github.com/repos/sandhose/zds-site/milestones{/number}","notifications_url":"https://api.github.com/repos/sandhose/zds-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandhose/zds-site/labels{/name}","releases_url":"https://api.github.com/repos/sandhose/zds-site/releases{/id}","deployments_url":"https://api.github.com/repos/sandhose/zds-site/deployments","created_at":"2014-06-02T15:49:57Z","updated_at":"2016-04-29T12:14:29Z","pushed_at":"2016-05-02T06:59:43Z","git_url":"git://github.com/sandhose/zds-site.git","ssh_url":"git@github.com:sandhose/zds-site.git","clone_url":"https://github.com/sandhose/zds-site.git","svn_url":"https://github.com/sandhose/zds-site","homepage":null,"size":90838,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"dev"}},"base":{"label":"zestedesavoir:release-v18","ref":"release-v18","sha":"1d1a5b0848fce6245f4c5fdaa01ee0bcecde51e0","user":{"login":"zestedesavoir","id":7406239,"avatar_url":"https://avatars.githubusercontent.com/u/7406239?v=3","gravatar_id":"","url":"https://api.github.com/users/zestedesavoir","html_url":"https://github.com/zestedesavoir","followers_url":"https://api.github.com/users/zestedesavoir/followers","following_url":"https://api.github.com/users/zestedesavoir/following{/other_user}","gists_url":"https://api.github.com/users/zestedesavoir/gists{/gist_id}","starred_url":"https://api.github.com/users/zestedesavoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestedesavoir/subscriptions","organizations_url":"https://api.github.com/users/zestedesavoir/orgs","repos_url":"https://api.github.com/users/zestedesavoir/repos","events_url":"https://api.github.com/users/zestedesavoir/events{/privacy}","received_events_url":"https://api.github.com/users/zestedesavoir/received_events","type":"Organization","site_admin":false},"repo":{"id":14778920,"name":"zds-site","full_name":"zestedesavoir/zds-site","owner":{"login":"zestedesavoir","id":7406239,"avatar_url":"https://avatars.githubusercontent.com/u/7406239?v=3","gravatar_id":"","url":"https://api.github.com/users/zestedesavoir","html_url":"https://github.com/zestedesavoir","followers_url":"https://api.github.com/users/zestedesavoir/followers","following_url":"https://api.github.com/users/zestedesavoir/following{/other_user}","gists_url":"https://api.github.com/users/zestedesavoir/gists{/gist_id}","starred_url":"https://api.github.com/users/zestedesavoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestedesavoir/subscriptions","organizations_url":"https://api.github.com/users/zestedesavoir/orgs","repos_url":"https://api.github.com/users/zestedesavoir/repos","events_url":"https://api.github.com/users/zestedesavoir/events{/privacy}","received_events_url":"https://api.github.com/users/zestedesavoir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zestedesavoir/zds-site","description":"Dépot ZDS","fork":false,"url":"https://api.github.com/repos/zestedesavoir/zds-site","forks_url":"https://api.github.com/repos/zestedesavoir/zds-site/forks","keys_url":"https://api.github.com/repos/zestedesavoir/zds-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zestedesavoir/zds-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zestedesavoir/zds-site/teams","hooks_url":"https://api.github.com/repos/zestedesavoir/zds-site/hooks","issue_events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/events{/number}","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/events","assignees_url":"https://api.github.com/repos/zestedesavoir/zds-site/assignees{/user}","branches_url":"https://api.github.com/repos/zestedesavoir/zds-site/branches{/branch}","tags_url":"https://api.github.com/repos/zestedesavoir/zds-site/tags","blobs_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/{sha}","languages_url":"https://api.github.com/repos/zestedesavoir/zds-site/languages","stargazers_url":"https://api.github.com/repos/zestedesavoir/zds-site/stargazers","contributors_url":"https://api.github.com/repos/zestedesavoir/zds-site/contributors","subscribers_url":"https://api.github.com/repos/zestedesavoir/zds-site/subscribers","subscription_url":"https://api.github.com/repos/zestedesavoir/zds-site/subscription","commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/zestedesavoir/zds-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/zestedesavoir/zds-site/contents/{+path}","compare_url":"https://api.github.com/repos/zestedesavoir/zds-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zestedesavoir/zds-site/merges","archive_url":"https://api.github.com/repos/zestedesavoir/zds-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zestedesavoir/zds-site/downloads","issues_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues{/number}","pulls_url":"https://api.github.com/repos/zestedesavoir/zds-site/pulls{/number}","milestones_url":"https://api.github.com/repos/zestedesavoir/zds-site/milestones{/number}","notifications_url":"https://api.github.com/repos/zestedesavoir/zds-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/labels{/name}","releases_url":"https://api.github.com/repos/zestedesavoir/zds-site/releases{/id}","deployments_url":"https://api.github.com/repos/zestedesavoir/zds-site/deployments","created_at":"2013-11-28T14:23:48Z","updated_at":"2016-04-23T08:44:52Z","pushed_at":"2016-05-02T06:59:43Z","git_url":"git://github.com/zestedesavoir/zds-site.git","ssh_url":"git@github.com:zestedesavoir/zds-site.git","clone_url":"https://github.com/zestedesavoir/zds-site.git","svn_url":"https://github.com/zestedesavoir/zds-site","homepage":null,"size":162562,"stargazers_count":146,"watchers_count":146,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":118,"mirror_url":null,"open_issues_count":212,"forks":118,"open_issues":212,"watchers":146,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575"},"html":{"href":"https://github.com/zestedesavoir/zds-site/pull/3575"},"issue":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3575"},"comments":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/issues/3575/comments"},"review_comments":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575/comments"},"review_comment":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/pulls/3575/commits"},"statuses":{"href":"https://api.github.com/repos/zestedesavoir/zds-site/statuses/e34c6ce5db7355b8722874f4d5565c6f82705352"}}}}