diff --git a/src/checkmk/install-service.sh b/src/checkmk/install-service.sh index 6822b58..d619409 100644 --- a/src/checkmk/install-service.sh +++ b/src/checkmk/install-service.sh @@ -23,6 +23,46 @@ cat << EOF > /etc/apache2/sites-available/000-default.conf EOF +cat << EOF > /etc/apache2/sites-available/default-ssl.conf + + RewriteEngine On + RewriteCond %{REQUEST_URI} !^/$CMK_INSTANCE + RewriteRule ^/(.*) https://%{HTTP_HOST}/$CMK_INSTANCE/\$1 [R=301,L] + + ServerAdmin webmaster@localhost + + DocumentRoot /var/www/html + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + + SSLEngine on + + SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem + SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key + + #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt + + #SSLCACertificatePath /etc/ssl/certs/ + #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt + + #SSLCARevocationPath /etc/apache2/ssl.crl/ + #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl + + #SSLVerifyClient require + #SSLVerifyDepth 10 + + #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + + +EOF + a2enmod ssl a2enmod rewrite a2ensite default-ssl