bashclub / zamba-lxc-toolbox

Zamba LXC Toolbox a script collection to setup LXC containers on Proxmox + ZFS. Zamba is the fusion of ZFS and Samba (standalone, active directory dc or active directory member), preconfigured to access ZFS snapshots by "Previous Versions" to easily recover encrypted by ransomware files, accidently deleted files or just to revert changes.
https://aow.de/
GNU General Public License v3.0
289 stars 62 forks source link

CheckMK Configuration Improvement #91

Closed NiclasPe closed 3 months ago

NiclasPe commented 1 year ago

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 3 months ago

Added to dev branch, release coming soon.