diff options
| author | Peter Wu | 2014-08-10 14:01:43 +0200 |
|---|---|---|
| committer | Peter Wu | 2014-08-10 14:10:53 +0200 |
| commit | 13bfffb34cd0385124d4084a66d49471cb457b6c (patch) | |
| tree | c736c1addb5c00ff18c39deb34a548adfffabeb0 /doc | |
| parent | Merge (a)sync code, reformat CGP.js (diff) | |
| download | apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.zip apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.gz apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.bz2 apt-panopticon_cgp-13bfffb34cd0385124d4084a66d49471cb457b6c.tar.xz | |
Add README file
Documents requirements, installation instructions (obsoleting
doc/INSTALL) and performance hints. Added a nginx server configuration
example that optimises for performance.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/INSTALL | 3 | ||||
| -rw-r--r-- | doc/nginx.conf | 41 |
2 files changed, 41 insertions, 3 deletions
diff --git a/doc/INSTALL b/doc/INSTALL deleted file mode 100644 index c0da959..0000000 --- a/doc/INSTALL +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | CGP is designed to run out of the box. If you want to modify some | ||
| 2 | configuration settings, please create conf/config.local.php to overrule | ||
| 3 | the settings from conf/config.php. | ||
diff --git a/doc/nginx.conf b/doc/nginx.conf new file mode 100644 index 0000000..d2efa46 --- /dev/null +++ b/doc/nginx.conf | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | server { | ||
| 2 | listen 80; | ||
| 3 | server_name localhost; | ||
| 4 | |||
| 5 | root /srv/http; | ||
| 6 | index index.php; | ||
| 7 | |||
| 8 | # This catches requests other than /CGP/rrd/ and PHP (see below) | ||
| 9 | location /CGP/ { | ||
| 10 | gzip on; | ||
| 11 | gzip_types "application/javascript text/css"; | ||
| 12 | # The static files do not change often, cache hint 1 month | ||
| 13 | expires 1M; | ||
| 14 | } | ||
| 15 | |||
| 16 | # Assume that CGP is located at /srv/http/CGP/, directly serve the RRD data | ||
| 17 | # files for use with the canvas graph type. Add compression to reduce data | ||
| 18 | # usage by 70% - 80%. | ||
| 19 | location /CGP/rrd/ { | ||
| 20 | alias /var/lib/collectd/rrd/; | ||
| 21 | gzip on; | ||
| 22 | gzip_types "*"; | ||
| 23 | # Cache hint: browser can recheck after 10 minutes | ||
| 24 | expires 10m; | ||
| 25 | #gzip_comp_level 3; | ||
| 26 | } | ||
| 27 | |||
| 28 | # Process PHP files through PHP-FPM | ||
| 29 | location ~ \.php$ { | ||
| 30 | try_files $uri =404; | ||
| 31 | fastcgi_pass unix:/run/php5-fpm.sock; | ||
| 32 | fastcgi_index index.php; | ||
| 33 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| 34 | include fastcgi_params; | ||
| 35 | } | ||
| 36 | |||
| 37 | # Disallow access to hidden files and directories (such as .git/) | ||
| 38 | location ~ /\. { | ||
| 39 | deny all; | ||
| 40 | } | ||
| 41 | } | ||
