From 5656e79578373bb1ab6007dbd4a6b2742506c7ba Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Thu, 20 May 2021 21:45:53 +0200 Subject: [PATCH] Added tls configuration + http reewrite to checkmk --- src/checkmk/install-service.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/checkmk/install-service.sh b/src/checkmk/install-service.sh index 9fc78e5..97aec0a 100644 --- a/src/checkmk/install-service.sh +++ b/src/checkmk/install-service.sh @@ -13,4 +13,18 @@ DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq install ./che omd create --admin-password $CMK_ADMIN_PW $CMK_INSTANCE -omd start $CMK_INSTANCE +cat << EOF > /etc/apache2/sites-available/000-default.conf + + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule ^/?(.*) https://%{SERVER_NAME}/spille [R,L] + +EOF + +a2enmod ssl +a2enmod rewrite +a2ensite default-ssl + +systemctl restart apache2.service + +omd start $CMK_INSTANCE \ No newline at end of file