From f71e0bc67912d31a2c4fa323ac1fe298220281fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Fri, 28 Jun 2024 13:12:37 +0200 Subject: [PATCH] Don't redirect HTTP to HTTPS It will most likely just cause troubles on local development. --- context/base/etc/https-proxy/ssl.conf.template | 6 ++++-- context/drupal/etc/nginx/templates/default.conf.template | 6 ------ context/nextjs/etc/nginx/templates/default.conf.template | 6 ------ context/proxy/etc/nginx/templates/default.conf.template | 6 ------ 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/context/base/etc/https-proxy/ssl.conf.template b/context/base/etc/https-proxy/ssl.conf.template index 5062bcb..b358f6b 100644 --- a/context/base/etc/https-proxy/ssl.conf.template +++ b/context/base/etc/https-proxy/ssl.conf.template @@ -1,5 +1,7 @@ - listen 443 ssl default_server; - listen [::]:443 ssl default_server; + listen 80; + listen [::]:80; + listen 443 default_server ssl; + listen [::]:443 default_server ssl; server_name _; ssl_certificate /cert/${FIRST_VIRTUAL_HOST}.crt; diff --git a/context/drupal/etc/nginx/templates/default.conf.template b/context/drupal/etc/nginx/templates/default.conf.template index 2770b30..cb9dd11 100644 --- a/context/drupal/etc/nginx/templates/default.conf.template +++ b/context/drupal/etc/nginx/templates/default.conf.template @@ -2,12 +2,6 @@ # and https://github.com/rpayanm/drupal/blob/master/nginx/default # and https://blog.john-pfeiffer.com/drupal-with-docker-compose-and-nginx-and-php-fpm-and-mariadb/ -server { - listen 80 default_server; - server_name _; - return 301 https://$host$request_uri; -} - server { include include.d/ssl.conf; diff --git a/context/nextjs/etc/nginx/templates/default.conf.template b/context/nextjs/etc/nginx/templates/default.conf.template index f644a18..db2b91d 100644 --- a/context/nextjs/etc/nginx/templates/default.conf.template +++ b/context/nextjs/etc/nginx/templates/default.conf.template @@ -1,9 +1,3 @@ -server { - listen 80 default_server; - server_name _; - return 301 https://$host$request_uri; -} - server { include include.d/ssl.conf; diff --git a/context/proxy/etc/nginx/templates/default.conf.template b/context/proxy/etc/nginx/templates/default.conf.template index dcb2db2..b889a96 100644 --- a/context/proxy/etc/nginx/templates/default.conf.template +++ b/context/proxy/etc/nginx/templates/default.conf.template @@ -1,9 +1,3 @@ -server { - listen 80 default_server; - server_name _; - return 301 https://$host$request_uri; -} - server { include include.d/ssl.conf;