Added monit to backend CMS
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user