{"id":2056,"date":"2017-02-03T15:15:56","date_gmt":"2017-02-03T06:15:56","guid":{"rendered":"https:\/\/www.naraeon.net\/?p=2056"},"modified":"2024-09-24T22:43:17","modified_gmt":"2024-09-24T13:43:17","slug":"semiauto-lets-encrypt-shared-hosting","status":"publish","type":"post","link":"https:\/\/www.naraeon.net\/en\/semiauto-lets-encrypt-shared-hosting\/","title":{"rendered":"Less bothering way to use Let\u2019s encrypt certificate on Shared Hosting"},"content":{"rendered":"<p>After writing <a href=\"https:\/\/www.naraeon.net\/en\/install-lets-encrypt-shared-hosting\/\">last article<\/a>, I found a way to semi-automate it.<\/p>\n<p>Required<\/p>\n<ol>\n<li>Shared hosting, that provides git, and php with at least version 5.6 (If yours doesn&#8217;t provide git, you need to directly access github page and download in zip format.)<\/li>\n<li>CPanel access to your hosting<\/li>\n<\/ol>\n<p>Procedure<\/p>\n<ol>\n<li>Access to your server with ssh.<\/li>\n<li>Clone acme-client for php, and go into it.<br \/>\n<blockquote><p>git clone https:\/\/github.com\/kelunik\/acme-client<br \/>\ncd acme-client<\/p><\/blockquote>\n<\/li>\n<li>Install composer. If there&#8217;re any error related to version, change &#8216;<em><strong>php<\/strong><\/em>&#8216;s into other version of phps(like php56, php70).<br \/>\n<blockquote><p><strong><em>php<\/em> <\/strong>-r &#8220;copy(&#8216;https:\/\/getcomposer.org\/installer&#8217;, &#8216;composer-setup.php&#8217;);&#8221;; <strong><em>php<\/em> <\/strong>composer-setup.php; php -r &#8220;unlink(&#8216;composer-setup.php&#8217;);&#8221;; <strong><em>php<\/em> <\/strong>composer.phar install &#8211;no-dev<\/p><\/blockquote>\n<\/li>\n<li>Write script<br \/>\n<blockquote><p>cd ~<br \/>\nnano autoscript.sh<br \/>\n(Belows are scripts to write in nano)<br \/>\n#!\/bin\/bash<br \/>\ncd \/home\/naraeons\/acme-client\/<br \/>\n<strong><em>php<\/em> <\/strong>bin\/acme setup &#8211;server letsencrypt &#8211;email\u00a0<em>(Your email)<br \/>\n<strong>php<\/strong><\/em> bin\/acme issue &#8211;domains <em>(Your domains)<\/em>\u00a0&#8211;path <em>(path to public_html)<\/em>\u00a0&#8211;server letsencrypt<br \/>\n(Save and exit)<br \/>\nchmod +x autoscript.sh<\/p><\/blockquote>\n<\/li>\n<li>Run autoscript.sh, and write down where does the script save your new certs. In my case, line with red underline shows my path.<br \/>\n<a href=\"https:\/\/www.naraeon.net\/semi-automatic-lets-encrypt-web-hosting__trashed\/acme-result\/#main\" rel=\"attachment wp-att-2053\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2053\" src=\"https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-acme-result-1024x241.png\" alt=\"\" width=\"640\" height=\"151\" srcset=\"https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-acme-result-1024x241.png 1024w, https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-acme-result-300x71.png 300w, https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-acme-result-768x181.png 768w, https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-acme-result.png 1463w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li>Access CPanel, and push Cron Jobs in Advanced.<br \/>\n<a href=\"https:\/\/www.naraeon.net\/semi-automatic-lets-encrypt-web-hosting__trashed\/cron-jobs\/#main\" rel=\"attachment wp-att-2054\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2054\" src=\"https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-cron-jobs.png\" alt=\"\" width=\"291\" height=\"157\" \/><\/a><\/li>\n<li>Set as below, and press Add New Cron Job.<br \/>\n<a href=\"https:\/\/www.naraeon.net\/semi-automatic-lets-encrypt-web-hosting__trashed\/add-cron\/#main\" rel=\"attachment wp-att-2055\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2055\" src=\"https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-add-cron.png\" alt=\"\" width=\"871\" height=\"739\" srcset=\"https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-add-cron.png 871w, https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-add-cron-300x255.png 300w, https:\/\/www.naraeon.net\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-add-cron-768x652.png 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/a><\/li>\n<li>When you need to refresh your certs, go and get your new certs at path you wrote down in Step 5. <a href=\"https:\/\/www.naraeon.net\/en\/install-lets-encrypt-shared-hosting\/\">Press here<\/a> and do the rest from step 7.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>After writing last article, I found a way to semi-automate it. Required Shared hosting, that provides git, and php with at least version 5.6 (If yours doesn&#8217;t provide git, you need to directly access github page and download in zip format.) CPanel access to your hosting Procedure Access to your server with ssh. Clone acme-client [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[148],"tags":[159,160,158,161,162],"class_list":["post-2056","post","type-post","status-publish","format-standard","hentry","category-linux","tag-a-small-orange","tag-bluehost","tag-letsencrypt","tag-ssl","tag-tls"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"en","enabled_languages":["kr","en"],"languages":{"kr":{"title":true,"content":true,"excerpt":false},"en":{"title":true,"content":true,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/posts\/2056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/comments?post=2056"}],"version-history":[{"count":5,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/posts\/2056\/revisions"}],"predecessor-version":[{"id":2135,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/posts\/2056\/revisions\/2135"}],"wp:attachment":[{"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/media?parent=2056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/categories?post=2056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naraeon.net\/en\/wp-json\/wp\/v2\/tags?post=2056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}