summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-11-12 01:49:51 +0300
committerMaxim Devaev <[email protected]>2021-11-12 01:49:51 +0300
commit8e60b8428814ffc8092a749a3d830d1f46309cae (patch)
tree00dac91530ad8c7029214285f1b2dd58077b8079 /configs
parentaa2de59ff5c500fa8617af5f2c26309e065bb8df (diff)
listen configs
Diffstat (limited to 'configs')
-rw-r--r--configs/nginx/listen-http.conf2
-rw-r--r--configs/nginx/listen-https.conf2
-rw-r--r--configs/nginx/nginx.conf17
-rw-r--r--configs/nginx/redirect-to-https.conf1
4 files changed, 12 insertions, 10 deletions
diff --git a/configs/nginx/listen-http.conf b/configs/nginx/listen-http.conf
new file mode 100644
index 00000000..76cb18d2
--- /dev/null
+++ b/configs/nginx/listen-http.conf
@@ -0,0 +1,2 @@
+listen 80;
+listen [::]:80;
diff --git a/configs/nginx/listen-https.conf b/configs/nginx/listen-https.conf
new file mode 100644
index 00000000..f6091bbd
--- /dev/null
+++ b/configs/nginx/listen-https.conf
@@ -0,0 +1,2 @@
+listen 443 ssl http2;
+listen [::]:443 ssl http2;
diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf
index 71775387..81b8265d 100644
--- a/configs/nginx/nginx.conf
+++ b/configs/nginx/nginx.conf
@@ -36,19 +36,16 @@ http {
include /etc/kvmd/nginx/kvmd.ctx-http.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-http.conf;
-#PROD server {
-#PROD listen 80;
-#PROD listen [::]:80;
-#PROD server_name localhost;
-#PROD return 301 https://$host$request_uri;
-#PROD }
-
server {
-#PROD listen 443 ssl http2;
-#PROD listen [::]:443 ssl http2;
server_name localhost;
-#PROD include /etc/kvmd/nginx/ssl.conf;
+ include /etc/kvmd/nginx/listen-http.conf;
+ include /etc/kvmd/nginx/redirect-to-https.conf;
+ }
+ server {
+ server_name localhost;
+ include /etc/kvmd/nginx/listen-https.conf;
+ include /etc/kvmd/nginx/ssl.conf;
include /etc/kvmd/nginx/kvmd.ctx-server.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-server.conf;
}
diff --git a/configs/nginx/redirect-to-https.conf b/configs/nginx/redirect-to-https.conf
new file mode 100644
index 00000000..7cf185dd
--- /dev/null
+++ b/configs/nginx/redirect-to-https.conf
@@ -0,0 +1 @@
+return 301 https://$host$request_uri;