{"id":6690,"date":"2026-03-11T12:30:55","date_gmt":"2026-03-11T10:30:55","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=6690"},"modified":"2026-03-11T12:30:55","modified_gmt":"2026-03-11T10:30:55","slug":"nginx-ssl-multidomain-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d1%96%d0%ba%d0%b0%d1%82","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=6690","title":{"rendered":"[nginx] ssl multidomain \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442"},"content":{"rendered":"\n<p>\u0412 \u0434\u0435\u044f\u043a\u0438\u0445 \u0432\u0438\u043f\u0430\u0434\u043a\u0430\u0445 \u0445\u043e\u0447\u0435\u0442\u044c\u0441\u044f \u043e\u0431\u0456\u0439\u0442\u0438\u0441\u044f \u043e\u0434\u043d\u0456\u0454\u044e \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0454\u044e nginx \u0434\u043b\u044f \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u0445 \u0441\u0430\u0439\u0442\u0456\u0432. \u0410\u043b\u0435 \u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0437 <strong>SSL<\/strong> \u0446\u0435 \u043d\u0435 \u0437\u0430\u0432\u0436\u0434\u0438 \u043c\u043e\u0436\u043b\u0438\u0432\u043e. \u041f\u043e\u0447\u0438\u043d\u0430\u044e\u0447\u0438 \u0437 <strong>1.15.9<\/strong> \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u043c\u0456\u043d\u043d\u0456 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0456\u0432.<\/p>\n\n\n<pre>\nmap $ssl_server_name $domain {\n default $ssl_server_name;\n ~(([^\\.]+)\\.([^\\.]+))$ $1;\n}\n\nserver {\n listen 443 ssl http2 default_server;\n listen [::]:443 ssl http2 default_server;\n server_name _;\n\n add_header Content-Type text\/html;\n return 200 \"domain: $domain, document_root: $document_root, request_uri: $request_uri\";\n\n ssl_certificate \/etc\/letsencrypt\/live\/$domain\/fullchain.pem; \n ssl_certificate_key \/etc\/letsencrypt\/live\/$domain\/privkey.pem; \n}\n<\/pre>\n\n\n<p>\u0414\u0430\u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0456\u044f \u0431\u0443\u0434\u0435 \u043f\u0440\u0430\u0446\u044e\u0432\u0430\u0442\u0438, \u044f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u043e\u0434\u0438\u043d \u0456 \u0442\u043e\u0439 \u0436\u0435 <strong>SSL issuer, SSL chain<\/strong>. \u0422\u0430\u043a, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0456\u0457 <strong>nginx<\/strong> \u0441\u043a\u0430\u0437\u0430\u043d\u043e<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Only OpenSSL 1.0.2 or higher supports separate\u00a0<a href=\"https:\/\/nginx.org\/en\/docs\/http\/configuring_https_servers.html#chains\">certificate chains<\/a>\u00a0for different certificates. With older versions, only one certificate chain can be used.<\/p>\n<\/blockquote>\n\n\n\n<p>\u0430\u043b\u0435 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043d\u0435 \u043f\u0440\u0430\u0446\u044e\u0454.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0434\u0435\u044f\u043a\u0438\u0445 \u0432\u0438\u043f\u0430\u0434\u043a\u0430\u0445 \u0445\u043e\u0447\u0435\u0442\u044c\u0441\u044f \u043e\u0431\u0456\u0439\u0442\u0438\u0441\u044f \u043e\u0434\u043d\u0456\u0454\u044e \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0454\u044e nginx \u0434\u043b\u044f \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u0445 \u0441\u0430\u0439\u0442\u0456\u0432. \u0410\u043b\u0435 \u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0437 SSL \u0446\u0435 \u043d\u0435 \u0437\u0430\u0432\u0436\u0434\u0438 \u043c\u043e\u0436\u043b\u0438\u0432\u043e. \u041f\u043e\u0447\u0438\u043d\u0430\u044e\u0447\u0438 \u0437 1.15.9 \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u043c\u0456\u043d\u043d\u0456 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0456\u0432. map $ssl_server_name $domain { default $ssl_server_name; ~(([^\\.]+)\\.([^\\.]+))$ $1; } server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name _; add_header Content-Type text\/html; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,15],"tags":[],"class_list":["post-6690","post","type-post","status-publish","format-standard","hentry","category-others","category-www"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6690"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6690\/revisions"}],"predecessor-version":[{"id":6691,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6690\/revisions\/6691"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}