{"id":2890,"date":"2020-05-29T17:14:07","date_gmt":"2020-05-29T14:14:07","guid":{"rendered":"http:\/\/surgery.moscow\/smos\/?p=2890"},"modified":"2020-05-29T17:14:10","modified_gmt":"2020-05-29T14:14:10","slug":"ssl-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%82-nginx","status":"publish","type":"post","link":"https:\/\/surgery.moscow\/smos\/2020\/05\/29\/ssl-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%82-nginx\/","title":{"rendered":"SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 nginx"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 <strong>openssl<\/strong> \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u044e\u0447\u0435\u0439:\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx.key -out nginx.crt\n<strong>\n<\/strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 :\n<strong>mkdir \/etc\/nginx\/ssl<\/strong>\n\n\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443:\n<strong>cp nginx.key \/etc\/nginx\/ssl\/ &amp;&amp; cp nginx.crt \/etc\/nginx\/ssl\/<\/strong>\n\n\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u043e \u043a\u043b\u044e\u0447\u0430\u0445 \u0432 \/etc\/nginx\/nginx.conf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n        listen 80 default_server;\n        listen [::]:80 default_server ipv6only=on;\n        listen 443 ssl;\n        server_name your_domain.com;\n        <strong>ssl_certificate \/etc\/nginx\/ssl\/nginx.crt;\n        ssl_certificate_key \/etc\/nginx\/ssl\/nginx.key;<\/strong>\n        location \/ {\n                ...\n        }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 openssl \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u044e\u0447\u0435\u0439: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx.key -out<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,12],"tags":[],"class_list":["post-2890","post","type-post","status-publish","format-standard","hentry","category-computer","category-internet"],"_links":{"self":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/comments?post=2890"}],"version-history":[{"count":1,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2890\/revisions"}],"predecessor-version":[{"id":2891,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/2890\/revisions\/2891"}],"wp:attachment":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/media?parent=2890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/categories?post=2890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/tags?post=2890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}