From: <abe...@us...> - 2014-12-16 17:27:38
|
Revision: 6854 http://sourceforge.net/p/astlinux/code/6854 Author: abelbeck Date: 2014-12-16 17:27:35 +0000 (Tue, 16 Dec 2014) Log Message: ----------- lighttpd, add proxy support for Monit if installed Modified Paths: -------------- branches/1.0/package/lighttpd/lighttpd.conf branches/1.0/package/lighttpd/lighttpd.init Modified: branches/1.0/package/lighttpd/lighttpd.conf =================================================================== --- branches/1.0/package/lighttpd/lighttpd.conf 2014-12-16 00:32:46 UTC (rev 6853) +++ branches/1.0/package/lighttpd/lighttpd.conf 2014-12-16 17:27:35 UTC (rev 6854) @@ -130,6 +130,12 @@ "realm" => "admin", "require" => "user=admin" ), + "/admin/monit/" => + ( + "method" => "basic", + "realm" => "admin", + "require" => "user=admin" + ), "/admin/netstat/" => ( "method" => "basic", @@ -155,6 +161,17 @@ @CLI_PROXY_SERVER@ ) @CLI_PROXY_SERVER@} +@MONIT_SERVER@$HTTP["scheme"] == "https" { +@MONIT_SERVER@ proxy.server += ( "/admin/monit/" => +@MONIT_SERVER@ ( "localhost" => +@MONIT_SERVER@ ( +@MONIT_SERVER@ "host" => "127.0.0.1", +@MONIT_SERVER@ "port" => "2812" +@MONIT_SERVER@ ) +@MONIT_SERVER@ ) +@MONIT_SERVER@ ) +@MONIT_SERVER@} + @NETSTAT_SERVER@$HTTP["scheme"] == "https" { @NETSTAT_SERVER@ proxy.server += ( "/admin/netstat/" => @NETSTAT_SERVER@ ( "localhost" => Modified: branches/1.0/package/lighttpd/lighttpd.init =================================================================== --- branches/1.0/package/lighttpd/lighttpd.init 2014-12-16 00:32:46 UTC (rev 6853) +++ branches/1.0/package/lighttpd/lighttpd.init 2014-12-16 17:27:35 UTC (rev 6854) @@ -96,6 +96,14 @@ cli_proxy_server="#" fi + if [ -f /etc/init.d/monit ]; then + # Always enable /admin/monit/ proxy so monit can be + # enabled/disabled without requiring a reboot via the web interface. + monit_server="" + else + monit_server="#" + fi + # Always enable /admin/netstat/ proxy so darkstat can be # enabled/disabled without requiring a reboot via the web interface. netstat_server="" @@ -136,6 +144,7 @@ -e "s|@HTTPSCGI@|${httpscgi}|g" \ -e "s|@IPV6@|${ipv6}|g" \ -e "s|@CLI_PROXY_SERVER@|${cli_proxy_server}|g" \ + -e "s|@MONIT_SERVER@|${monit_server}|g" \ -e "s|@NETSTAT_SERVER@|${netstat_server}|g" \ -e "s|@PHONEPROV@|${phoneprov}|g" \ -e "s!@PHONEPROV_ALLOW@!${phoneprov_allow}!g" \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |