Modify your config to look like the one in the picture below.\
Make sure to change [[www.example.com]] to your own domain in both of the server blocks.\
You will also need to change the path of [[ssl_certificate]] and [[ssl_certificate_key ]]to match with your own system.\
\
**WARNING:**\
Be carefull when adding the last line (HSTS), please test this implementation in a closed environment before deploying to production. If you're not familiar with HSTS, please research this before implementing, as it is known to break some things.