Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckMK Configuration Improvement #91

Open
NiclasPe opened this issue Jul 3, 2023 · 0 comments
Open

CheckMK Configuration Improvement #91

NiclasPe opened this issue Jul 3, 2023 · 0 comments

Comments

@NiclasPe
Copy link

NiclasPe commented Jul 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant