{"id":644,"date":"2018-02-02T21:06:30","date_gmt":"2018-02-02T21:06:30","guid":{"rendered":"http:\/\/watchdiana.fail\/blog\/?p=644"},"modified":"2018-02-02T21:07:17","modified_gmt":"2018-02-02T21:07:17","slug":"644","status":"publish","type":"post","link":"https:\/\/watchdiana.fail\/blog\/2018\/02\/02\/644\/","title":{"rendered":"Apache on Raspberry Pi, for forwarding SSL to internal port"},"content":{"rendered":"<p>Here I am, and my rum is upstairs, and people are TALKING to me.  PEOPLE.<\/p>\n<p>This is all your fault, Dominic.<\/p>\n<p>So, ssh into pi, because a Desktop for people who can handle it when their rum is upstairs.  <\/p>\n<p>apt-get install apache2 -y<\/p>\n<p>echo &#8216;deb http:\/\/httpredir.debian.org\/debian jessie-backports main contrib non-free&#8217; > \/etc\/apt\/sources.list.d\/jessie-backports.list<\/p>\n<p>apt-key adv &#8211;keyserver keyserver.ubuntu.com &#8211;recv-keys 7638D0442B90D010<br \/>\napt-key adv &#8211;keyserver keyserver.ubuntu.com &#8211;recv-keys 8B48AD6246925553<\/p>\n<p>apt-get update<\/p>\n<p>apt-get install dehydrated-apache2 -y<\/p>\n<p>echo &#8220;www.marvelous_website.com&#8221; > \/etc\/dehydrated\/domains.txt<\/p>\n<p>echo &#8220;CONTACT_EMAIL=me@marvelous_website.com&#8221; > \/etc\/dehydrated\/conf.d\/mail.sh<\/p>\n<p>dehydrated -c<\/p>\n<p>a2enmod ssl<\/p>\n<p>&#8212;<\/p>\n<p>cat >> \/etc\/apache2\/sites-enabled\/000-default.conf <<EOF\n<VirtualHost *:443><br \/>\n\tServerAdmin webmaster@marvellous_website.com<\/p>\n<p>\tProxyPass \/ http:\/\/localhost:4001\/<br \/>\n\tProxyPassReverse \/ http:\/\/localhost:4001<\/p>\n<p>\tDocumentRoot \/var\/www\/html<\/p>\n<p>\tErrorLog ${APACHE_LOG_DIR}\/error.log<br \/>\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined<\/p>\n<p>        SSLEngine On<br \/>\n        SSLCertificateFile \/var\/lib\/dehydrated\/certs\/marvellous_website.com\/fullchain.pem<br \/>\n        SSLCertificateKeyFile \/var\/lib\/dehydrated\/certs\/marvellous_website.com\/privkey.pem<\/p>\n<p><\/VirtualHost><br \/>\nEOF<\/p>\n<p>systemctl restart apache2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here I am, and my rum is upstairs, and people are TALKING to me. PEOPLE. This is all your fault, Dominic. So, ssh into pi, because a Desktop for people who can handle it when their rum is upstairs. apt-get install apache2 -y echo &#8216;deb http:\/\/httpredir.debian.org\/debian jessie-backports main contrib non-free&#8217; > \/etc\/apt\/sources.list.d\/jessie-backports.list apt-key adv &#8211;keyserver [&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],"tags":[],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-life","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":2,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/644\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}