Adding initial notes for book2rss stuff, and modified notes on LetsEncrypt configuration

This commit is contained in:
David Thurstenson 2017-04-25 10:14:38 -05:00
parent 12cd073635
commit db6cee9011
3 changed files with 12 additions and 5 deletions

7
Audiobook RSS Feed.wiki Normal file
View File

@ -0,0 +1,7 @@
=Serving Audiobooks as an RSS Feed=
I want to serve my library of audiobooks as an RSS feed so that I can use my favorite podcast app as the player.
Packages used:
* python-pyrss2gen: RSS generation
* python-mutagen: metadata extraction

View File

@ -79,16 +79,15 @@ That will get the basic framework ready for your virtualhost definition. Here is
</Directory>
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/wiki.thurstylark.com/cert.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/wiki.thurstylark.com/chain.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/wiki.thurstylark.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/wiki.thurstylark.com/privkey.pem"
</VirtualHost>
}}}
A couple things to note here: First, this defines two virtualhosts, one for port 80 and one for port 443. This is in order to redirect _all_ traffic to HTTPS except for a very small exception.
This exception is what you see on line 5 in the code above. Only `*/.well-known/*` is not redirected because this is the dir that certbot uses for domain validation. Certbot will only validate over http, and will fail if given a 301 redirect. This allows validation to complete successfuly without a configuration change, thus aiding our automation efforts. Everything else gets a 301 redirect to HTTPS. Be sure to define `DocumentRoot` with the correct location for *both* VirtualHosts, or certbot will fail to renew things correctly. (found this one out the hard way)
This exception is what you see on line 12 in the code above. Only `*/.well-known/*` is not redirected because this is the dir that certbot uses for domain validation. Certbot will only validate over http, and will fail if given a 301 redirect. This allows validation to complete successfuly without a configuration change, thus aiding our automation efforts. Everything else gets a 301 redirect to HTTPS. Be sure to define `DocumentRoot` with the correct location for *both* VirtualHosts, or certbot will fail to renew things correctly. (found this one out the hard way)
Lines 20-23 configure Apache to look for the necessary files in the right places. The locations listed here are actually symlinks to the real files, which are kept in an archive. These links are maintained by certbot automagically.
Lines 28-29 configure Apache to look for the necessary files in the right places. The locations listed here are actually symlinks to the real files, which are kept in an archive. These links are maintained by certbot automagically.
To obtain new certs for a subdomain, copy this config to `/etc/httpd/conf/extra/`, update the config with the appropriate subdomain name, comment out lines 5, 6, 9, 10, and 20-23 to disable the redirect and ssl configuration, and add an include in the main httpd.conf. Once that is all set up, you can run certbot to obtain new certs. Once certbot is finished, you can remove the comments, restart httpd, and begin testing.
To obtain new certs for a subdomain, copy this config to `/etc/httpd/conf/extra/`, update the config with the appropriate subdomain name, comment out lines 5-29 to disable the redirect and ssl configuration, and add an include in the main httpd.conf. Once that is all set up, you can run certbot to obtain new certs. Once certbot is finished, you can remove the comments, restart httpd, and begin testing.

View File

@ -8,6 +8,7 @@ Half brain dump, half documentation practice.
* [[Eudyptula Challenge]]
* [[Cgit]] -- Configuration and hosting of https://git.thurstylark.com/
* [[Automating Android App Builds]] -- Documentation of my setup for building AsteroidOS Sync from https://www.github.com/asteroidos/AsteroidOSSync
* [[Audiobook RSS Feed]]
===Dotfiles===