From 57f657ddc06324416cef912dc691fffde6753206 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 10 Aug 2014 11:41:20 +0200 Subject: Support customized RRD URLs Use case: I would like to bypass PHP for serving the RRD files and allow the webserver (nginx) to compress it to reduce load on the Raspberry Pi. I could go through all kinds of URL rewriting, but it is much easier to set `$CONFIG['rrd_url'] = 'rrd/{file}';` instead and add a corresponding location + alias directive to the nginx configuration. This depends on https://github.com/manuelluis/jsrrdgraph/pull/17 to avoid breaking on '='. --- conf/config.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'conf') diff --git a/conf/config.php b/conf/config.php index 66b5d0e..157012a 100644 --- a/conf/config.php +++ b/conf/config.php @@ -65,6 +65,11 @@ $CONFIG['graph_smooth'] = false; # draw min/max spikes in a lighter color in graphs with type default $CONFIG['graph_minmax'] = false; +# The URL that provides RRD files for the "canvas" graph type. Examples: +# 'rrd/{file}' is replaced by 'rrd/example.com/load/load.rrd' +# 'rrd.php?path={file_escaped}' becomes 'rrd.php?path=host%3Fload%3Fload.rrd' +$CONFIG['rrd_url'] = 'rrd.php?path={file_escaped}'; + # browser cache time for the graphs (in seconds) $CONFIG['cache'] = 90; -- cgit v1.1