Added monit to backend CMS

This commit is contained in:
2021-01-08 14:26:33 +01:00
parent 8cafe06982
commit afffd9f74d
7 changed files with 117 additions and 4 deletions

View File

@@ -20,4 +20,16 @@ Alias /backend/database /usr/share/phpmyadmin
</Directory>
<Location /backend/monit>
RewriteEngine on
RewriteRule /monit /monit/$1 [R]
</Location>
<Location /backend/monit/>
#enables/disables monit-websocket
deny from all
ProxyPass unix:/var/run/monit/monit.sock|http://127.0.0.1/
ProxyPassReverse unix:/var/run/monit/monit.sock|http://127.0.0.1/
</Location>
#endConf

View File

@@ -11,4 +11,5 @@ chown Backend:Backend -R /var/log/PhpMyAdmin
systemctl reload "$phpFPMService"
#Auto disable backends at night
echo "0 0 * * * root bash /opt/toggle/toggle-Netdata.sh -d > >/dev/null 2>&1" >> /etc/cron.d/autodisablebackend
echo "0 0 * * * root bash /opt/toggle/toggle-PhpMyAdmin.sh -d > >/dev/null 2>&1" >> /etc/cron.d/autodisablebackend
echo "0 0 * * * root bash /opt/toggle/toggle-PhpMyAdmin.sh -d > >/dev/null 2>&1" >> /etc/cron.d/autodisablebackend
echo "0 0 * * * root bash /opt/toggle/toggle-MonitWebui.sh -d > >/dev/null 2>&1" >> /etc/cron.d/autodisablebackend

View File

@@ -34,6 +34,11 @@ location = /backend/netdata {
}
}
location /backend/monit/ {
deny all; #enables/disables monit-websocket
proxypass http://unix:/var/run/monit/monit.sock:/;
}
location ~ /\.ht {
deny all;
}