Updated ssl server setup (markdown)

casey langen 2017-07-10 21:34:15 -07:00
parent da878b60a7
commit badfb8feab

@ -8,23 +8,23 @@ the following instructions detail configuring ssl termination using nginx and [l
# install nginx and certbot # install nginx and certbot
`note1:` certbot is used to acquire ssl certificates from letsencrypt. **note1**: certbot is used to acquire ssl certificates from letsencrypt.
* `sudo apt-get install nginx` * `sudo apt-get install nginx`
* `echo 'deb http://httpredir.debian.org/debian jessie-backports main contrib non-free' | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list` * `echo 'deb http://httpredir.debian.org/debian jessie-backports main contrib non-free' | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list`
* `sudo apt-get update` * `sudo apt-get update`
* `sudo apt-get install certbot -t jessie-backports` * `sudo apt-get install certbot -t jessie-backports`
`note2:` ensure the host running the musikcube server can accept connections from port 443. **note2**: ensure the host running the musikcube server can accept connections from port 443.
* `sudo certbot certonly --standalone` * `sudo certbot certonly --standalone`
`note3:` your machine no longer needs to accept connections from port 443 once the certificates are downloaded. **note3**: your machine no longer needs to accept connections from port 443 once the certificates are downloaded.
* `sudo chgrp www-data /etc/letsencrypt/live` * `sudo chgrp www-data /etc/letsencrypt/live`
* `sudo chmod 750 /etc/letsencrypt/live` * `sudo chmod 750 /etc/letsencrypt/live`
`note4:` letsencrypt will email you when your cert is about to expire. when that happens, forward port 443 to your host again, and run `sudo letsencrypt renew`. don't forget to shut down the forwarded port after it finishes! **note4**: letsencrypt will email you when your cert is about to expire. when that happens, forward port 443 to your host again, and run `sudo letsencrypt renew`. don't forget to shut down the forwarded port after it finishes!
# configure nginx # configure nginx