From 9c56f9433253574f098fd2664acf26aba69b05fe Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Fri, 12 Nov 2021 06:22:45 +0300 Subject: [PATCH] testenv https redirect --- Makefile | 3 +-- testenv/nginx.append.conf | 8 -------- testenv/redirect-to-https.conf | 1 + 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 testenv/nginx.append.conf create mode 100644 testenv/redirect-to-https.conf diff --git a/Makefile b/Makefile index 2ce67620..c0a95f5c 100644 --- a/Makefile +++ b/Makefile @@ -120,8 +120,7 @@ run: testenv $(TESTENV_GPIO) && test -d /sys/kernel/debug/gpio-mockup/`basename $(TESTENV_GPIO)`/ || (echo \"Missing GPIO mockup\" && exit 1) \ && (socat PTY,link=$(TESTENV_HID) PTY,link=/dev/ttyS11 &) \ && cp -r /usr/share/kvmd/configs.default/nginx/* /etc/kvmd/nginx \ - && sed -i '$$ s/.$$//' /etc/kvmd/nginx/nginx.conf \ - && cat testenv/nginx.append.conf >> /etc/kvmd/nginx/nginx.conf \ + && cp testenv/redirect-to-https.conf /etc/kvmd/nginx \ && cp -a /testenv/.ssl/nginx /etc/kvmd/nginx/ssl \ && cp -a /testenv/.ssl/vnc /etc/kvmd/vnc/ssl \ && cp /usr/share/kvmd/configs.default/kvmd/*.yaml /etc/kvmd \ diff --git a/testenv/nginx.append.conf b/testenv/nginx.append.conf deleted file mode 100644 index 04a33b6c..00000000 --- a/testenv/nginx.append.conf +++ /dev/null @@ -1,8 +0,0 @@ - server { - listen 443 ssl http2; - server_name localhost; - 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/testenv/redirect-to-https.conf b/testenv/redirect-to-https.conf new file mode 100644 index 00000000..6a310968 --- /dev/null +++ b/testenv/redirect-to-https.conf @@ -0,0 +1 @@ +return 301 https://$host:4430$request_uri;