Secure Your Lab
The following instructions will allow the use fo HTTPS in your lab address.
Navigate to the AWS Console. Go to the Security Groups settings and select your instance. Edit the inbound rules to include HTTP and HTTPS, then save.

Create a DH parameter for OpenSSL:
Change access to the system administrator only:
Link this file to the system folder:
Install Certbot:
Generate an SSL Certificate using Certbot:
You will be prompted to enter an email and a domain (the newly added custom domain, for example: "YOUR-DOMAIN")
You should see:
Congratulations! Your certificate and chain have been sav /etc/letsencrypt/live/YOUR-DOMAIN/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/YOUR-DOMAIN/privkey.pem
Install nginx to set up a reverse proxy, so you do not have to type ":8000" at the end of the URL:
Create a configuration file for nginx:
Copy and paste the following code, based on Mozilla Configuration Generator, into this file. Be careful to modify the text to include your domain wherever "YOUR-DOMAIN" is present.
Use CTRL+O then enter to overwrite the document and CTRL+X to exit.
Unlink the existing default file:
Link the new nginx file for JupyterHub:
Start nginx:
Edit JupyterHub configuration file:
Add the following to force JupyterHub to only listen to local connections (127.0.0.1):
Use CTRL+O then enter to overwrite the document and CTRL+X to exit.
Restart nginx and JupyterHub:
Last updated