Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit14c525dc703d630a4dd31659e65633765cc411b1 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2020-06-06 21:24:18 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2020-06-06 21:24:18 +0300
Files8c902dc9b59582fa0d8eae6160da0e33e85333f3
syndamia.com-14c525dc703d630a4dd31659e65633765cc411b1.tar
syndamia.com-14c525dc703d630a4dd31659e65633765cc411b1.tar.gz
syndamia.com-14c525dc703d630a4dd31659e65633765cc411b1.zip
Parent95afb42d6364ed6d02f465ba504eba619ea8c3fc (diff)
Updated nginx config file (ssl).
1 files changed, 12 insertions, 1 deletions
-rw-r--r--syndamiadotcom13
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;
+}