{"id":1120,"date":"2019-08-16T18:58:04","date_gmt":"2019-08-16T09:58:04","guid":{"rendered":"https:\/\/oboki.net\/workspace\/?p=1120"},"modified":"2019-09-01T22:19:50","modified_gmt":"2019-09-01T13:19:50","slug":"wordpress-nextcloud-%ec%84%a4%ec%b9%98-2","status":"publish","type":"post","link":"https:\/\/oboki.net\/workspace\/system\/linux\/wordpress-nextcloud-%ec%84%a4%ec%b9%98-2\/","title":{"rendered":"HC\ub2d8\uc744 \uc704\ud55c WordPress &#038; NextCloud \uc124\uce58 \uc808\ucc28 Part 2"},"content":{"rendered":"<h1>HC\ub2d8\uc744 \uc704\ud55c WordPress &amp; NextCloud \uc124\uce58 \uc808\ucc28 Part 2<\/h1>\n<p><a href=\"https:\/\/oboki.net\/workspace\/system\/network\/network-freenom%ec%97%90%ec%84%9c-%eb%ac%b4%eb%a3%8c-%eb%8f%84%eb%a9%94%ec%9d%b8-%ec%9d%b4%ec%9a%a9%ed%95%98%ea%b8%b0\/\">freenom.com \ubb34\ub8cc \ub3c4\uba54\uc778<\/a>\uc740, \ub8e8\ud2b8 \ub3c4\uba54\uc778\uc5d0 CNAME \uc8fc\uc18c(iptime ddns)\ub97c \ub9e4\ud551\ud560 \uc218 \uc5c6\ub294\uac83\uac19\ub2e4. <del>A Record \ub9cc \ub8e8\ud2b8 \ub3c4\uba54\uc778\uc73c\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub294 \ub4ef<\/del> \uae30\uc874\uc5d0 \ud558\ub824\uace0 \ud588\ub358<\/p>\n<ul>\n<li>example.com\n<ul>\n<li>\ub300\ubb38<\/li>\n<\/ul>\n<\/li>\n<li>example.com\/blog\n<ul>\n<li>\ube14\ub85c\uadf8<\/li>\n<\/ul>\n<\/li>\n<li>example.com\/drive\n<ul>\n<li>\ud074\ub77c\uc6b0\ub4dc \uc2a4\ud1a0\ub9ac\uc9c0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\uc704\uc640 \uac19\uc740 \uad6c\uc131 \ub300\uc2e0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc11c\ube0c \ub3c4\uba54\uc778 \uc8fc\uc18c\ub97c \uc774\uc6a9\ud574\uc11c \uc6f9\uc11c\ube44\uc2a4\ub97c \ubd84\ub9ac\ud560 \uc608\uc815.<\/p>\n<ul>\n<li>example.com \/ www.example.com\n<ul>\n<li>\ub300\ubb38<\/li>\n<\/ul>\n<\/li>\n<li>blog.example.com\n<ul>\n<li>\ube14\ub85c\uadf8<\/li>\n<\/ul>\n<\/li>\n<li>drive.example.com\n<ul>\n<li>\ud074\ub77c\uc6b0\ub4dc \uc2a4\ud1a0\ub9ac\uc9c0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Nextcloud \ub294 \ubcf4\uc548 \uc5f0\uacb0\uc774 \uad8c\uc7a5\uc0ac\ud56d\uc774\uae30 \ub54c\ubb38\uc5d0 \uc774\uc655 \ud558\ub294\uae40\uc5d0 \uc778\uc99d\uc11c\ub3c4 \ubc1c\uae09 \ubc1b\uc544 ssl \uc124\uc815\uae4c\uc9c0 \uc9c4\ud589\ud55c\ub2e4.<\/p>\n<h2>Let&#8217;s Encrypt \ubb34\ub8cc SSL \uc778\uc99d\uc11c \ubc1c\uae09<\/h2>\n<p><a href=\"https:\/\/oboki.net\/workspace\/system\/security\/lets-encrypt\/\">https:\/\/oboki.net\/workspace\/system\/security\/lets-encrypt\/<\/a> \uac00\uc774\ub4dc \ub300\ub85c \uc544\ub798 \ub3c4\uba54\uc778\uc5d0 \ub300\ud55c \uc778\uc99d\uc11c\ub97c \ubc1c\uae09\ubc1b\ub294\ub2e4.<\/p>\n<ul>\n<li>www.example.com<\/li>\n<li>blog.example.com<\/li>\n<li>drive.example.com<\/li>\n<\/ul>\n<h2>Apache httpd \uc124\uc815 \ubcc0\uacbd<\/h2>\n<h3>httpd.conf<\/h3>\n<p><code>vi \/sw\/httpd\/conf\/httpd.conf<\/code> \ud30c\uc77c\uc744 \uc5f4\uc5b4 \uae30\uc874\uc5d0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc124\uc815\ub3fc \uc788\ub358 \ubd80\ubd84\uc744<\/p>\n<pre><code class=\"language-conf\">DocumentRoot &quot;\/data2\/docs&quot;\n&lt;Directory &quot;\/data2\/docs&quot;&gt;\n    #\n    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,\n    # or any combination of:\n    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews\n    #\n    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;\n    # doesn&#039;t give it to you.\n    #\n    # The Options directive is both complicated and important.  Please see\n    # http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options\n    # for more information.\n    #\n    Options Indexes FollowSymLinks\n\n    #\n    # AllowOverride controls what directives may be placed in .htaccess files.\n    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:\n    #   AllowOverride FileInfo AuthConfig Limit\n    #\n    AllowOverride All\n\n    #\n    # Controls who can get stuff from this server.\n    #\n    Require all granted\n&lt;\/Directory&gt;<\/code><\/pre>\n<p>\uc544\ub798\uc640 \uac19\uc774 \ubcc0\uacbd\ud574\uc8fc\uace0<\/p>\n<pre><code class=\"language-conf\">DocumentRoot &quot;\/data2\/docs&quot;\n&lt;Directory &quot;\/data2\/docs\/www&quot;&gt;\n    Options Indexes FollowSymLinks\n    AllowOverride All\n    Require all granted\n&lt;\/Directory&gt;\n\n&lt;Directory &quot;\/data2\/docs\/blog&quot;&gt;\n    Options Indexes FollowSymLinks\n    AllowOverride All\n    Require all granted\n&lt;\/Directory&gt;\n\n&lt;Directory &quot;\/data2\/docs\/drive&quot;&gt;\n    Options Indexes FollowSymLinks\n    AllowOverride All\n    Require all granted\n&lt;\/Directory&gt;<\/code><\/pre>\n<p>\ub2e4\uc74c\uacfc \uac19\uc740 \ub514\ub809\ud1a0\ub9ac\ub97c \uc0dd\uc131\ud574\uc900\ub2e4.<\/p>\n<ul>\n<li>\/data2\/docs\/www\n<ul>\n<li>www.example.com \uc11c\ube0c \ub3c4\uba54\uc778\uc758 \ub8e8\ud2b8 \uacbd\ub85c<\/li>\n<\/ul>\n<\/li>\n<li>\/data2\/docs\/blog\n<ul>\n<li>blog.example.com \uc11c\ube0c \ub3c4\uba54\uc778\uc758 \ub8e8\ud2b8 \uacbd\ub85c<\/li>\n<\/ul>\n<\/li>\n<li>\/data2\/docs\/drive\n<ul>\n<li>drive.example.com \uc11c\ube0c \ub3c4\uba54\uc778\uc758 \ub8e8\ud2b8 \uacbd\ub85c<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><code>vi \/sw\/httpd\/conf\/httpd.conf<\/code> \ud30c\uc77c\uc5d0\uc11c \ucd94\uac00\ub85c \ub2e4\uc74c \uc124\uc815\ub4e4\uc744 \uc8fc\uc11d\ud574\uc81c\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-conf\">LoadModule ssl_module modules\/mod_ssl.so\n\n# Secure (SSL\/TLS) connections\nInclude conf\/extra\/httpd-ssl.conf<\/code><\/pre>\n<h3>httpd-ssl.conf<\/h3>\n<p>\uc774\uc5b4\uc11c <code>vi \/sw\/httpd\/conf\/extra\/httpd-ssl.conf<\/code> \ud30c\uc77c\uc5d0\uc11c \uac00\uc0c1 \ud638\uc2a4\ud2b8\uc640 \uc778\uc99d\uc11c \uc815\ubcf4\uc5d0 \ub300\ud55c \uc124\uc815\uc744 \ucd94\uac00\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-conf\">Listen 443\nSSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES\nSSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES\nSSLHonorCipherOrder on \nSSLProtocol all -SSLv3\nSSLProxyProtocol all -SSLv3\nSSLPassPhraseDialog  builtin\nSSLSessionCache        &quot;shmcb:\/sw\/httpd\/logs\/ssl_scache(512000)&quot;\nSSLSessionCacheTimeout  300\n\n&lt;VirtualHost _default_:443&gt;\nDocumentRoot &quot;\/data2\/docs\/www&quot;\nServerName www.example.com\nServerAdmin skia@example.com\nErrorLog &quot;\/sw\/httpd\/logs\/error_log&quot;\nTransferLog &quot;\/sw\/httpd\/logs\/access_log&quot;\nSSLEngine on\nSSLCertificateFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/cert.pem&quot;\nSSLCertificateKeyFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/privkey.pem&quot;\nSSLCertificateChainFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/fullchain.pem&quot;\n&lt;FilesMatch &quot;\\.(cgi|shtml|phtml|php)$&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/FilesMatch&gt;\n&lt;Directory &quot;\/sw\/httpd\/cgi-bin&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/Directory&gt;\nBrowserMatch &quot;MSIE [2-5]&quot; \\\n         nokeepalive ssl-unclean-shutdown \\\n         downgrade-1.0 force-response-1.0\nCustomLog &quot;\/sw\/httpd\/logs\/ssl_request_log&quot; \\\n          &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\&quot;%r\\&quot; %b&quot;\n&lt;\/VirtualHost&gt;                                  \n\n&lt;VirtualHost _default_:443&gt;\nDocumentRoot &quot;\/data2\/docs\/blog&quot;\nServerName blog.example.com\nServerAdmin skia@example.com\nErrorLog &quot;\/sw\/httpd\/logs\/error_log&quot;\nTransferLog &quot;\/sw\/httpd\/logs\/access_log&quot;\nSSLEngine on\nSSLCertificateFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/cert.pem&quot;\nSSLCertificateKeyFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/privkey.pem&quot;\nSSLCertificateChainFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/fullchain.pem&quot;\n&lt;FilesMatch &quot;\\.(cgi|shtml|phtml|php)$&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/FilesMatch&gt;\n&lt;Directory &quot;\/sw\/httpd\/cgi-bin&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/Directory&gt;\nBrowserMatch &quot;MSIE [2-5]&quot; \\\n         nokeepalive ssl-unclean-shutdown \\\n         downgrade-1.0 force-response-1.0\nCustomLog &quot;\/sw\/httpd\/logs\/ssl_request_log&quot; \\\n          &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\&quot;%r\\&quot; %b&quot;\n&lt;\/VirtualHost&gt;                                  \n\n&lt;VirtualHost _default_:443&gt;\nDocumentRoot &quot;\/data2\/docs\/drive&quot;\nServerName drive.example.com\nServerAdmin skia@example.com\nErrorLog &quot;\/sw\/httpd\/logs\/error_log&quot;\nTransferLog &quot;\/sw\/httpd\/logs\/access_log&quot;\nSSLEngine on\nSSLCertificateFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/cert.pem&quot;\nSSLCertificateKeyFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/privkey.pem&quot;\nSSLCertificateChainFile &quot;\/etc\/letsencrypt\/live\/www.example.com\/fullchain.pem&quot;\n&lt;FilesMatch &quot;\\.(cgi|shtml|phtml|php)$&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/FilesMatch&gt;\n&lt;Directory &quot;\/sw\/httpd\/cgi-bin&quot;&gt;\n    SSLOptions +StdEnvVars\n&lt;\/Directory&gt;\nBrowserMatch &quot;MSIE [2-5]&quot; \\\n         nokeepalive ssl-unclean-shutdown \\\n         downgrade-1.0 force-response-1.0\nCustomLog &quot;\/sw\/httpd\/logs\/ssl_request_log&quot; \\\n          &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\&quot;%r\\&quot; %b&quot;\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n<p>\uc774\ub807\uac8c \uac00\uc0c1\ud638\uc2a4\ud2b8\ub97c \uc124\uc815\ud574\uc8fc\uac8c \ub418\uba74 \ubb3c\ub9ac\uc801\uc73c\ub85c\ub294 \uac19\uc740 \uc11c\ubc84\uc5d0 \uc811\uadfc\ud558\ub354\ub77c\ub3c4 \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc5b4\ub5a4 \ud638\uc2a4\ud2b8\uc758 \uc694\uccad\uc744 \ud588\ub294\uc9c0(blog.example.com \uc73c\ub85c \uc811\uadfc\ud588\ub294\uc9c0 drive.example.com \uc73c\ub85c \uc811\uadfc\ud588\ub294\uc9c0)\uc5d0 \ub530\ub77c \uc6f9\uc11c\ubc84\uac00 \ub2e4\ub978 \uc11c\ube44\uc2a4\ub97c \uc81c\uacf5\ud55c\ub2e4.<\/p>\n<p>\uc5ec\uae30\uae4c\uc9c0 \uc124\uc815\uc774 \uc644\ub8cc\ub418\uc5c8\uc73c\uba74 root \uacc4\uc815\uc5d0\uc11c <code>httpd -k restart<\/code> \uba85\ub839\uc73c\ub85c \uc544\ud30c\uce58\ub97c \uc7ac\uae30\ub3d9\ud558\uace0, \uae30\uc874\uc758 \uc6f9 \uc18c\uc2a4\ub4e4\uc744 \ud574\ub2f9 \uc11c\ube0c\ub3c4\uba54\uc778\ub4e4\uc758 \ub8e8\ud2b8 \uacbd\ub85c\ub4e4\ub85c \uc774\ub3d9\uc2dc\ucf1c \uc0ac\uc6a9\ud558\uba74 \ub05d.<\/p>\n<h3>RewriteRule<\/h3>\n<p>\ubcf4\uc548 \uc5f0\uacb0\ub9cc\uc744 \uc774\uc6a9\ud574\uc11c \uc11c\ube44\uc2a4\ud558\uae30\uc704\ud574 <code>vi \/sw\/httpd\/conf\/httpd.conf<\/code> \ud30c\uc77c\uc5d0\uc11c \ub2e4\uc74c\uacfc \uac19\uc740 \uc124\uc815\uc744 \ucd94\uac00\ud558\uc5ec, http \uc811\uc18d\uc744 https \ub85c \ubaa8\ub450 \ub9ac\ub2e4\uc774\ub809\uc158\ud560 \uc218 \uc788\ub2e4.<\/p>\n<pre><code class=\"language-conf\">RewriteEngine On\nRewriteCond %{HTTPS}  !=on\nRewriteRule ^\/?(.*) https:\/\/%{SERVER_NAME}\/$1 [R,L]<\/code><\/pre>\n<p>\uc120\ud0dd\uc801\uc73c\ub85c http \uc811\uadfc\uc744 \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 <code>httpd-vhosts.conf<\/code>\ub97c \ub85c\ub4dc\ud574\uc11c \ubcc4\ub3c4 \uc124\uc815\uc744 \ud574\uc8fc\uc5b4\uc57c \ud55c\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HC\ub2d8\uc744 \uc704\ud55c WordPress &amp; NextCloud \uc124\uce58 \uc808\ucc28 Part 2 freenom.com \ubb34\ub8cc \ub3c4\uba54\uc778\uc740, \ub8e8\ud2b8 \ub3c4\uba54\uc778\uc5d0 CNAME \uc8fc\uc18c(iptime ddns)\ub97c \ub9e4\ud551\ud560 \uc218 \uc5c6\ub294\uac83\uac19\ub2e4. A Record \ub9cc \ub8e8\ud2b8 \ub3c4\uba54\uc778\uc73c\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub294 \ub4ef \uae30\uc874\uc5d0 \ud558\ub824\uace0 \ud588\ub358 example.com \ub300\ubb38 example.com\/blog \ube14\ub85c\uadf8 example.com\/drive \ud074\ub77c\uc6b0\ub4dc \uc2a4\ud1a0\ub9ac\uc9c0 \uc704\uc640 \uac19\uc740 \uad6c\uc131 \ub300\uc2e0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc11c\ube0c \ub3c4\uba54\uc778 \uc8fc\uc18c\ub97c \uc774\uc6a9\ud574\uc11c \uc6f9\uc11c\ube44\uc2a4\ub97c \ubd84\ub9ac\ud560 \uc608\uc815. example.com \/ www.example.com [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,158,55],"tags":[],"class_list":["post-1120","post","type-post","status-publish","format-standard","hentry","category-linux","category-nextcloud","category-wordpress"],"_links":{"self":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/comments?post=1120"}],"version-history":[{"count":3,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1120\/revisions"}],"predecessor-version":[{"id":1154,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1120\/revisions\/1154"}],"wp:attachment":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/media?parent=1120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/categories?post=1120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/tags?post=1120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}