Adding initial notes for book2rss stuff, and modified notes on LetsEncrypt configuration
This commit is contained in:
parent
12cd073635
commit
db6cee9011
|
@ -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
|
|
@ -79,16 +79,15 @@ That will get the basic framework ready for your virtualhost definition. Here is
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLCertificateFile "/etc/letsencrypt/live/wiki.thurstylark.com/cert.pem"
|
SSLCertificateChainFile "/etc/letsencrypt/live/wiki.thurstylark.com/fullchain.pem"
|
||||||
SSLCertificateChainFile "/etc/letsencrypt/live/wiki.thurstylark.com/chain.pem"
|
|
||||||
SSLCertificateKeyFile "/etc/letsencrypt/live/wiki.thurstylark.com/privkey.pem"
|
SSLCertificateKeyFile "/etc/letsencrypt/live/wiki.thurstylark.com/privkey.pem"
|
||||||
</VirtualHost>
|
</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.
|
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.
|
||||||
|
|
|
@ -8,6 +8,7 @@ Half brain dump, half documentation practice.
|
||||||
* [[Eudyptula Challenge]]
|
* [[Eudyptula Challenge]]
|
||||||
* [[Cgit]] -- Configuration and hosting of https://git.thurstylark.com/
|
* [[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
|
* [[Automating Android App Builds]] -- Documentation of my setup for building AsteroidOS Sync from https://www.github.com/asteroidos/AsteroidOSSync
|
||||||
|
* [[Audiobook RSS Feed]]
|
||||||
|
|
||||||
===Dotfiles===
|
===Dotfiles===
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue