From: Christian Heller Date: Sun, 22 Mar 2020 23:27:35 +0000 (+0100) Subject: Redirect all HTTP to HTTPS. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/day?a=commitdiff_plain;h=a77fc2bde4db1f695035846947ba6205c9807be9;p=config Redirect all HTTP to HTTPS. --- diff --git a/buster/etc_files/web/etc/nginx/nginx.conf b/buster/etc_files/web/etc/nginx/nginx.conf index 83092d6..1e9c0c2 100644 --- a/buster/etc_files/web/etc/nginx/nginx.conf +++ b/buster/etc_files/web/etc/nginx/nginx.conf @@ -30,20 +30,9 @@ http { include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; - # If we wanted a simple file server … - ## HTTP server: only enforce HTTPS - #server { - # listen 80; - # return 301 https://$host$request_uri; - #} - # - ## HTTPS server - #server { - # listen 443 ssl; - # server_name REPLACE_fqdn_ECALPER; - # ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem; - # ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem; - # root /var/www/html/; - # index index.html index.htm index.nginx-debian.html; - #} + # Redirect all HTTP requests to HTTPS. + server { + listen 80; + return 301 https://$host$request_uri; + } }