{"id":760,"date":"2018-06-11T01:55:13","date_gmt":"2018-06-11T06:55:13","guid":{"rendered":"http:\/\/sunapi386.ca\/wordpress\/?p=760"},"modified":"2018-06-11T01:55:13","modified_gmt":"2018-06-11T06:55:13","slug":"generate-https-cert","status":"publish","type":"post","link":"https:\/\/sunapi386.ca\/wordpress\/generate-https-cert\/","title":{"rendered":"Generate https cert"},"content":{"rendered":"<p>&#8220;`<br \/>\nsudo apt-get update<br \/>\nsudo apt-get install -y software-properties-common<br \/>\nsudo add-apt-repository ppa:certbot\/certbot<br \/>\nsudo apt-get update<br \/>\nsudo apt-get install -y python-certbot-nginx<br \/>\n&#8220;`<br \/>\nThen get a certificate `sudo certbot &#8211;nginx certonly`<\/p>\n<p>Now edit the nginx config to add the fullchain.pem and privkey.pem paths.<\/p>\n<p>sudo vim \/etc\/nginx\/sites-enabled\/default<\/p>\n<p>Add lines 22-25.<\/p>\n<p>server {<br \/>\n20 # SSL configuration<br \/>\n21 #<br \/>\n22 listen 443 ssl default_server;<br \/>\n23 listen [::]:443 ssl default_server;<br \/>\n24 ssl_certificate_key \/etc\/letsencrypt\/live\/autox.network\/privkey.pem;<br \/>\n25 ssl_certificate \/etc\/letsencrypt\/live\/autox.network\/fullchain.pem;<br \/>\n&#8230;<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;` sudo apt-get update sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:certbot\/certbot sudo apt-get update sudo apt-get install -y python-certbot-nginx &#8220;` Then get a certificate `sudo certbot &#8211;nginx certonly` Now edit the nginx config to add the fullchain.pem and privkey.pem paths. sudo vim \/etc\/nginx\/sites-enabled\/default Add lines 22-25. server { 20 # SSL configuration 21 # &hellip; <a href=\"https:\/\/sunapi386.ca\/wordpress\/generate-https-cert\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Generate https cert<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-760","post","type-post","status-publish","format-standard","hentry","category-thoughts"],"_links":{"self":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":2,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":763,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/760\/revisions\/763"}],"wp:attachment":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}