From 3d7d67297742a3029ec321a6ff0c5f0f38ffb7c6 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 18 Nov 2021 02:23:08 +0300 Subject: [PATCH] nginx redirect --- nginx/README.md | 3 +++ nginx/redirect | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 nginx/README.md create mode 100644 nginx/redirect diff --git a/nginx/README.md b/nginx/README.md new file mode 100644 index 0000000..67d8f5c --- /dev/null +++ b/nginx/README.md @@ -0,0 +1,3 @@ +# nginx + +- [`redirect`](redirect) diff --git a/nginx/redirect b/nginx/redirect new file mode 100644 index 0000000..b41750f --- /dev/null +++ b/nginx/redirect @@ -0,0 +1,18 @@ +server { + listen 80; + + server_name SITE_URL; + + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + + server_name SITE_URL; + + ssl_certificate PATH_TO_PEM; + ssl_certificate_key PATH_TO_PEM; + + root FOLDER; +}