diff options
Updated nginx config file (ssl).
1 files changed, 12 insertions, 1 deletions
| -rw-r--r-- | syndamiadotcom | 13 |
diff --git a/syndamiadotcom b/syndamiadotcom index 1520330..52a296b 100644 --- a/syndamiadotcom +++ b/syndamiadotcom @@ -1,10 +1,14 @@ # NGINX configuration file for the website server { - listen 80; + listen *:443 ssl; root /var/www/syndamiadotcom/website; index index.html; server_name www.syndamia.com; + # SSL Certificate from certbot + ssl_certificate /etc/letsencrypt/live/www.syndamia.com/fullchain.pem; + ssl_cerificate_key /etc/letsencrypt/live/www.syndamia.com/privkey.pem; + # This removes .html extension from url (https://stackoverflow.com/a/38238001/12036073) location / { if ($request_uri ~ ^/(.*)\.html$) { @@ -13,3 +17,10 @@ server { try_files $uri $uri.html $uri/ =404; } } + +# Redirect http to https +server { + listen *:80; + server_name www.syndamia.com; + return 301 https://$server_name$request_uri; +} |