Docker

We set up 4 different containers to run each of our sites on. Within the container, each site was bound to port 8080 with gunicorn. It was then mapped to a unique port on the AWS instance.

docker

cURL

We used cURL to test if our Flask server running inside the container was working:

docker

NGINX

We used NGINX to proxy requests to the AWS instance and serve the Flask site. We created 4 different server {} blocks for each of our sites, each bound to port 80 and serving content on different subdomains.

nginx

We used Freenom to acquire a domain and Certbot to generate SSL certificates in order to serve our websites over HTTPS.

The following links work properly (including subdomains):