CheckMK Configuration Improvement
NiclasPe opened this issue · 1 comments
NiclasPe commented
Hi, to improve the user experience with the CheckMK instance, I would suggest the following Apache2 configurations:
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^/$ https://%{HTTP_HOST}/{cmk_site} [R=301,L]
</VirtualHost>
/etc/apache2/sites-available/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/{cmk_site}
RewriteRule ^/(.*) https://%{HTTP_HOST}/{cmk_site}/$1 [R=301,L]
</VirtualHost>
</IfModule>
This always takes you to the corresponding CheckMK site.
Thanks for that good Tool
Greetings Niclas
thorstenspille commented
Added to dev branch, release coming soon.