{"id":1284,"date":"2021-01-23T04:45:58","date_gmt":"2021-01-22T19:45:58","guid":{"rendered":"http:\/\/leenux.kr\/?p=1284"},"modified":"2021-01-26T09:48:23","modified_gmt":"2021-01-26T00:48:23","slug":"ubuntu-lets-encrypt-%ed%86%b5%ed%95%b4-apache2-ssl-%ec%a0%81%ec%9a%a9%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/leenux.kr\/?p=1284","title":{"rendered":"[Ubuntu] Let\u2019s Encrypt \ud1b5\ud574 Apache2 SSL \uc801\uc6a9\ud558\uae30"},"content":{"rendered":"\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>Let\u2019s Encrypt \uc124\uce58<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install letsencrypt<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\ubc29\ud654\ubcbd \uad00\ub9ac \ud328\ud0a4\uc9c0 \uc124\uce58<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install firewalld<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>80, 443 (HTTP, HTTPS) \ud3ec\ud2b8 \uc5f4\uae30<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --permanent --zone=public --add-port=80\/tcp &amp;&amp; firewall-cmd --permanent --zone=public --add-port=443\/tcp<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\ubc29\ud654\ubcbd \uc0c1\ud0dc \uc870\ud68c<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\ud655\uc778 <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --list-ports<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\uc778\uc99d\uc11c \uc0dd\uc131<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>certbot --auto certonly --standalone -d [\ub3c4\uba54\uc778.com]<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\uc544\ud30c\uce58 \uc124\uc815\ud30c\uc77c <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/apache2\/apache2.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost _default_:80 _default_:443>\n    DocumentRoot\n    #http\ub85c \uc811\uc18d\ud558\uc5ec https \uc804\ud658\uc774 \ub418\uc9c0 \uc54a\ub294 \uacbd\uc6b0\uc5d0 \ub300\uccb4 \uc811\uc18d \ub610\ub294 400\ud398\uc774\uc9c0\ub85c \uacf5\uace0\n    #400.php\ub294 \ubcc4\ub3c4\ub85c \uc0dd\uc131\ud574\uc57c \ud568.\n    #ErrorDocument 400 \"[\ub3c4\uba54\uc778]\"\n    servername link\n    SSLEngine on\n    SSLHonorCipherOrder on\n    SSLProtocol all -sslv3\n    #Cert.pem\n    SSLCertificateFile [\ud30c\uc77c\uc8fc\uc18c]\n    #privkey.pem\n    SSLCertificatekeyFile [\ud30c\uc77c\uc8fc\uc18c]\n    #chain.pem\n    #SSLCACertificateFile [\ud30c\uc77c\uc8fc\uc18c]\n    &lt;IfModule http2_module>\n        ProtocolsHonorOrder on\n        Protocols h2 http\/1.1\n    &lt;\/IfModule>\n    &lt;IfModule mod_headers.c>\n        Header set Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\" env=HTTPS\n    &lt;\/IfModule>\n&lt;\/VirtualHost><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[Ubuntu] Let\u2019s Encrypt \ud1b5\ud574 Apache2 SSL \uc801\uc6a9\ud558\uae30<\/p>\n","protected":false},"author":1,"featured_media":1168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,33],"tags":[],"_links":{"self":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1284"}],"collection":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1284"}],"version-history":[{"count":3,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1284\/revisions"}],"predecessor-version":[{"id":1298,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1284\/revisions\/1298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/media\/1168"}],"wp:attachment":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}