{"id":1760,"date":"2025-09-11T15:56:05","date_gmt":"2025-09-11T15:56:05","guid":{"rendered":"https:\/\/alexisiumus.ru\/?p=1760"},"modified":"2025-09-11T15:56:33","modified_gmt":"2025-09-11T15:56:33","slug":"%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-apache2-%d0%b4%d0%bb%d1%8f-certbot","status":"publish","type":"post","link":"https:\/\/alexisiumus.ru\/?p=1760","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 apache2 \u0434\u043b\u044f certbot"},"content":{"rendered":"\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438 \u0443\u0447\u0435\u0441\u0442\u044c. \u0410 \u0442\u0430\u043a\u0436\u0435 \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Apache.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <code>80<\/code> \u0434\u043b\u044f <code>tolerate.ru<\/code><\/li>\n\n\n\n<li>\u0421\u043e\u0437\u0434\u0430\u0451\u0442 SSL-\u0445\u043e\u0441\u0442 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <code>443<\/code>, \u043d\u043e \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439: \u0443\u043a\u0430\u0437\u0430\u043d <code>syoma.ru:443<\/code>, \u0430 <code>ServerName<\/code> \u2014 <code>tolerate.ru<\/code><\/li>\n\n\n\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b Let&#8217;s Encrypt<\/li>\n\n\n\n<li>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <code>RewriteEngine<\/code>, \u043d\u043e \u043d\u0435 \u0437\u0430\u0434\u0430\u0451\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430<\/strong> <code>&lt;VirtualHost syoma.ru:443> ServerName tolerate.ru<\/code> \u2014 <code>syoma.ru:443<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <code>*:443<\/code>, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0435 <code>tolerate.ru<\/code>: <code>&lt;VirtualHost *:443><\/code><\/li>\n\n\n\n<li><strong>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 <code>SSLEngine on<\/code><\/strong> \u2014 \u0411\u0435\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 SSL \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f: <code>SSLEngine on<\/code><\/li>\n\n\n\n<li><strong>\u041d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b <code>RewriteRule<\/code><\/strong> \u2014 <code>RewriteEngine on<\/code> \u0432\u043a\u043b\u044e\u0447\u0451\u043d, \u043d\u043e \u043d\u0435\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0441 HTTP \u043d\u0430 HTTPS \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c: <code>RewriteCond %{HTTPS} off RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0c \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 Apache<\/h3>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u041c\u043e\u0434\u0443\u043b\u044c<\/th><th>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th><th>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/th><\/tr><\/thead><tbody><tr><td><code>ssl<\/code><\/td><td>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 HTTPS<\/td><td><code>sudo a2enmod ssl<\/code><\/td><\/tr><tr><td><code>rewrite<\/code><\/td><td>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0427\u041f\u0423<\/td><td><code>sudo a2enmod rewrite<\/code><\/td><\/tr><tr><td><code>headers<\/code><\/td><td>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 (\u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0448\u044c <code>RequestHeader<\/code>)<\/td><td><code>sudo a2enmod headers<\/code><\/td><\/tr><tr><td><code>http2<\/code> <em>(\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e)<\/em><\/td><td>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 HTTP\/2<\/td><td><code>sudo a2enmod http2<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart apache2<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 \u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n    ServerName tolerate.ru\n    ServerAdmin root@skil.su\n    DocumentRoot \/var\/www\/html\n\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\n\n    RewriteEngine on\n    RewriteCond %{HTTPS} off\n    RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} &#91;L,R=301]\n&lt;\/VirtualHost&gt;\n\n&lt;IfModule mod_ssl.c&gt;\n&lt;VirtualHost *:443&gt;\n    ServerName tolerate.ru\n    ServerAdmin root@skil.su\n    DocumentRoot \/var\/www\/html\n\n    SSLEngine on\n    SSLCertificateFile \/etc\/letsencrypt\/live\/tolerate.ru\/fullchain.pem\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/tolerate.ru\/privkey.pem\n\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\n&lt;\/VirtualHost&gt;\n&lt;\/IfModule&gt;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438 \u0443\u0447\u0435\u0441\u0442\u044c. \u0410 \u0442\u0430\u043a\u0436\u0435 \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Apache. \u2705 \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \ud83d\udd0c \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 Apache \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438: \u041c\u043e\u0434\u0443\u043b\u044c \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f ssl \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 HTTPS sudo a2enmod ssl rewrite \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0427\u041f\u0423 sudo a2enmod rewrite [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[33],"tags":[],"class_list":["post-1760","post","type-post","status-publish","format-standard","hentry","category-33"],"_links":{"self":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1760"}],"version-history":[{"count":2,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1760\/revisions"}],"predecessor-version":[{"id":1762,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1760\/revisions\/1762"}],"wp:attachment":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}