{"id":4964,"date":"2021-10-27T09:55:47","date_gmt":"2021-10-27T09:55:47","guid":{"rendered":"https:\/\/tst-amo.net.ua\/blog\/?p=4964"},"modified":"2021-10-27T09:59:53","modified_gmt":"2021-10-27T09:59:53","slug":"lestscripts-%d0%be%d1%88%d0%b8%d0%b1%d0%ba%d0%b0-%d0%be%d0%b1%d0%bd%d0%be%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d1%8f-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%82%d0%b0-%d0%b4%d0%bb%d1%8f-seaf","status":"publish","type":"post","link":"https:\/\/tst-amo.net.ua\/blog\/?p=4964","title":{"rendered":"Lestscripts \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0434\u043b\u044f Seafile"},"content":{"rendered":"<p>\u0427\u0435\u0440\u0435\u0437, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 seafile \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre>Simulating renewal of an existing certificate for tst-amo.net.ua and 4 more domains\r\nPerforming the following challenges:\r\nhttp-01 challenge for seafile.tst-amo.net.ua\r\nhttp-01 challenge for cloud.tst-amo.net.ua\r\nhttp-01 challenge for mail.tst-amo.net.ua\r\nhttp-01 challenge for tst-amo.net.ua\r\nhttp-01 challenge for www.tst-amo.net.ua\r\nUsing the webroot path \/home\/www for all unmatched domains.\r\nWaiting for verification...\r\n<span style=\"color: #ff0000;\">Challenge failed for domain seafile.tst-amo.net.ua<\/span>\r\nhttp-01 challenge for seafile.tst-amo.net.ua\r\nCleaning up challenges\r\nRunning post-hook command: service nginx reload\r\n<span style=\"color: #ff0000;\">Error output from post-hook command service:<\/span>\r\n<span style=\"color: #ff0000;\">Redirecting to \/bin\/systemctl reload nginx.service<\/span>\r\n\r\nSome challenges have failed.\r\n\r\nIMPORTANT NOTES:\r\n- The following errors were reported by the server:\r\n\r\nDomain: seafile.tst-amo.net.ua\r\nType: unauthorized\r\nDetail: Invalid response from\r\nhttp:\/\/seafile.tst-amo.net.ua\/.well-known\/acme-challenge\/trV7-GvdK_9eK-Fbm3dqaf-qWxA5Jwj2-EgHCMMwt38\r\n[94.158.83.27]: \"&lt;html&gt;\\r\\n&lt;head&gt;&lt;title&gt;404 Not\r\nFound&lt;\/title&gt;&lt;\/head&gt;\\r\\n&lt;body&gt;\\r\\n&lt;center&gt;&lt;h1&gt;404 Not\r\nFound&lt;\/h1&gt;&lt;\/center&gt;\\r\\n&lt;hr&gt;&lt;center&gt;nginx&lt;\/center&gt;\\r\\n\"\r\n\r\nTo fix these errors, please make sure that your domain name was\r\nentered correctly and the DNS A\/AAAA record(s) for that domain\r\ncontain(s) the right IP address.<\/pre>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043f\u0443\u0442\u044c \u0432 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0435 seafile.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u0438\u043a test.html \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 (\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0445 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b)<\/p>\n<pre># cp -R \/home\/www\/.well-known \/home\/www\/seafile\/\r\n# cd \/home\/www\/seafile\/ &amp;&amp; echo \"TEST CERTBOT\" &gt;\u00a0\/.well-known\/acme-chalenge\/test.html<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432\u0438\u0434\u0430:<\/p>\n<pre># curl -L seafile.tst-amo.net.ua\/.well-known\/acme-challenge\/test.html\r\n<span style=\"color: #ff0000;\">TEST CERTBOT<\/span><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d &#8211; \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 nginx.<\/p>\n<p>\u0422\u0430\u043a \u0438 \u0435\u0441\u0442\u044c. \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f lestcripts \u0443 \u043c\u0435\u043d\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u0431\u0449\u0438\u0439 \u0444\u0430\u0439\u043b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f:<\/p>\n<pre># Let'sCript\r\ninclude <span style=\"color: #ff0000;\">acme.conf<\/span>;\r\n# cat acme.conf\r\nlocation \/.well-known {\r\nroot \/home\/www;\r\n}<\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b acme.conf \u043d\u043e \u0434\u043b\u044f seafile:<\/p>\n<pre># pwd\r\n\/etc\/nginx<\/pre>\n<pre># vi acme_seafile.conf\r\nlocation \/.well-known {\r\n\u00a0 \u00a0 \u00a0 \u00a0root \/home\/www\/seafile;\r\n}<\/pre>\n<p>\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 nginx \u0434\u043b\u044f seafile:<\/p>\n<pre># vi\u00a0 \/etc\/nginx\/sites-available\/seafile\r\n\r\n# Let'sCript\r\ninclude <span style=\"color: #ff0000;\">acme_seafile.conf<\/span>;<\/pre>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0441\u0435\u043a\u0446\u0438\u044e:<\/p>\n<pre>server {\r\n    listen 80;\r\n    server_name seafile.tst-amo.net.ua;\r\n    server_tokens off;\r\n    <span style=\"color: #ff0000;\">root \/home\/www\/seafile;<\/span>\r\n    location \/seafile {\r\n      rewrite ^ https:\/\/$http_host$request_uri? permanent; # force redirect http to https\r\n      }\r\n}<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<pre># nginx -t &amp;&amp; nginx -s reload<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c letscript \u0432 \u0447\u0435\u0440\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435:<\/p>\n<pre># certbot certonly <span style=\"color: #ff0000;\">--dry-run<\/span> <span style=\"color: #ff0000;\">-w \/home\/www\/<\/span> -d tst-amo.net.ua,www.tst-amo.net.ua,mail.tst-amo.net.ua,cloud.tst-amo.net.ua <span style=\"color: #ff0000;\">-w \/home\/www\/seafile\/<\/span> -d seafile.tst-amo.net.ua<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0430 &#8211;dry-run.<\/p>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-bottom-right\"><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts4964&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts4964&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0427\u0435\u0440\u0435\u0437, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 seafile \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443: Simulating renewal of an existing certificate for tst-amo.net.ua and 4 more domains Performing the following challenges: http-01 challenge for seafile.tst-amo.net.ua http-01 challenge for cloud.tst-amo.net.ua http-01 challenge for mail.tst-amo.net.ua http-01 challenge for tst-amo.net.ua http-01 challenge for www.tst-amo.net.ua Using the webroot path \/home\/www for all &#8230;<\/p>\n<p><a href=\"https:\/\/tst-amo.net.ua\/blog\/?p=4964\" class=\"more-link\">Continue reading &lsquo;Lestscripts \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0434\u043b\u044f Seafile&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,113,47,330,36],"tags":[],"class_list":["post-4964","post","type-post","status-publish","format-standard","hentry","category-centos","category-letsencrypt","category-linux","category-seafile","category-www"],"_links":{"self":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4964"}],"collection":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4964"}],"version-history":[{"count":4,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4964\/revisions"}],"predecessor-version":[{"id":4968,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4964\/revisions\/4968"}],"wp:attachment":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}