{"id":191,"date":"2023-04-05T21:33:46","date_gmt":"2023-04-05T19:33:46","guid":{"rendered":"https:\/\/gilbert.busana.lu\/?p=191"},"modified":"2023-04-05T21:33:46","modified_gmt":"2023-04-05T19:33:46","slug":"apache2-create-lets-encrypt-certificate-for-ssl","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=191","title":{"rendered":"Apache2: create Let\u2019s encrypt certificate for SSL"},"content":{"rendered":"\n<p>Install the <em>certbot<\/em>:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>apt install certbot python3-certbot-apache<\/code><\/pre><\/div>\n\n\n\n<p>Set the following in your vhost conf file:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ServerName mydomain.com\nServerAlias www.mydomain.com<\/code><\/pre><\/div>\n\n\n\n<p>Verify that your configuration is fine:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apache2ctl configtest\nsudo systemctl reload apache2<\/code><\/pre><\/div>\n\n\n\n<p>Make sure the dns entry in the external dns server points to your proxy server\/web-server. Then launch the certification process:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo certbot --apache\nsudo systemctl status certbot.timer\nsudo certbot renew --dry-run<\/code><\/pre><\/div>\n\n\n\n<p>Note: nots ure about the last commands. Needs to be retested.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install the certbot: Set the following in your vhost conf file: Verify that your configuration is fine: Make sure the dns entry in the external dns server points to your proxy server\/web-server. Then launch the certification process: Note: nots ure about the last commands. Needs to be retested.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16,15],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-reverse-proxy","category-webserver"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=191"}],"version-history":[{"count":5,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/191\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}