apt install -t jessie-backports monit -y
nano /etc/monit/conf.d/basics
set daemon 60
set mailserver external-relay.de,
external-relay2.de
set mail-format { from: monit@meinekleinefarm.net }
set alert xenadmin@meinekleinefarm.net # receive all alerts
set httpd port 2812 and
use address localhost # only accept conne$
allow localhost # allow localhost t$
allow admin:monit # require user 'adm$
a2enmod proxy proxy_http
cd /etc/apache2/sites-available/
nano monit.meinekleinefarm.net.conf
monit.meinekleinefarm.net.conf
monit.meinekleinefarm.net.conf
- monit.meinekleinefarm.net.conf
<VirtualHost *:80>
ServerName monit.meinekleinefarm.net
Redirect permanent / https://monit.meinekleinefarm.net/
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@meinekleinefarm.net
ServerName monit.meinekleinefarm.net
ServerAlias monit.meinekleinefarm.net
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLProxyEngine On
ProxyPass / http://localhost:2812/
ProxyPassReverse / http://localhost:2812/
<Location /monit/>
Order deny,allow
Allow from all
# ProxyPassReverseCookiePath / /monit/
</Location>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/meinekleinefarm.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/meinekleinefarm.net/privkey.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
a2ensite monit.meinekleinefarm.net.conf
service apache2 reload
Weiter zur → Monit Konfiguration