home · contact · privacy
Redirect all HTTP to HTTPS.
[config] / buster / etc_files / web / etc / nginx / nginx.conf
index 63ea6202ef93c8b2f8cac3466e453abfa8cfff3b..1e9c0c2ee5f023c4629e2234f6b440630d3a56a9 100644 (file)
@@ -23,25 +23,16 @@ http {
     # logging deactivated due to GDPR
     #access_log /var/log/nginx/access.log;
     #error_log /var/log/nginx/error.log;
+    access_log off;
+    error_log off;
 
     # virtual hosts: sites-enabled is the Debian way, conf.d the NGINX default
     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;
+    }
 }