diff options
Diffstat (limited to '')
-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 | } | ||