title: How do I deploy an AWS EC2 Flask application to HTTPS port 443 with SSL?
body: <p>I am unable to get my Flask application to run on <a href="https://my.domain/" rel="nofollow noreferrer">https://my.domain/</a>, although it does successfully deploy to the regular <a href="http://my.domain/" rel="nofollow noreferrer">http://my.domain/</a></p>
  
  <p>I was able to successfully obtain and test SSL certificates and verify they work on a Jupyter Notebook instance at <a href="https://my.domain:8888/" rel="nofollow noreferrer">https://my.domain:8888/</a></p>
  
  <p>I was able to modify /etc/httpd/conf/httpd.conf to get access to my root home directory at <a href="https://my.domain/" rel="nofollow noreferrer">https://my.domain/</a> -> /home/username/code/</p>
  
  <p>I am also able to successfully redirect http requests to https, but the landing page is just an linux explorer, not my Flask application.</p>
  
  <p>That is, even after extensive editing of httpd.conf, ssl.conf, and wsgi.conf to launch the Flask application on port 443, it does not do so, but remains on port 80.</p>
  
  <p>Also, I noticed that whenever I deploy my code changes via AWS CodeStar, the deployment overwrites my EC2 instance /etc/httpd/conf.d/wsgi.conf file.</p>
  
  <p>Is there a setting somewhere on the Amazon side that I must configure so that my application deploys to the correct port?  Or do I need to edit config files on my EC2 instance server?  Or is something else wrong?</p>