zamba-lxc-toolbox icon indicating copy to clipboard operation
zamba-lxc-toolbox copied to clipboard

CheckMK Configuration Improvement

Open NiclasPe opened this issue 1 year ago • 0 comments

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

NiclasPe avatar Jul 03 '23 20:07 NiclasPe