summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Wall <richard@aziz>2010-06-23 23:06:51 +0100
committerRichard Wall <richard@aziz>2010-06-23 23:06:51 +0100
commit0ca1d509416149a83343baf35599b97a97d0bbb9 (patch)
treee356245c9e1b986e673bcb03ea3aa98d6cd20c2a
parentdfa15525f5898af109122b75847362539c2cb20d (diff)
Add an example nginx config example.
-rw-r--r--docs/nginx.conf.example59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/nginx.conf.example b/docs/nginx.conf.example
new file mode 100644
index 0000000..402999c
--- /dev/null
+++ b/docs/nginx.conf.example
@@ -0,0 +1,59 @@
+# This is an example of a minimal nginx config file, demonstrating:
+# * how to set the mime type of served RRD files
+# * how to configure nginx to compress the rrd files on the fly
+# * how to setup a /data url alias pointing to the collectd RRD folder
+#
+# Add the relevant parts of this example config to your existing nginx config
+# files, or modify it and use it directly by running the following command line
+# from your Jarmon working directory "nginx -p . -c docs/nginx.conf.example" eg:
+#
+# richard@aziz:~/Projects/Jarmon/trunk$ nginx -p . -c docs/nginx.conf.example
+# [alert]: could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
+#
+# The error line is normal if you are running nginx as an unprivileged user.
+
+
+daemon off;
+pid nginx.pid;
+error_log nginx.error.log info;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ sendfile on;
+ keepalive_timeout 65;
+ tcp_nodelay on;
+
+ gzip on;
+ gzip_disable "MSIE [1-6]\.(?!.*SV1)";
+
+ client_body_temp_path /tmp/nginx_body;
+ proxy_temp_path /tmp/nginx_proxy;
+ fastcgi_temp_path /tmp/nginx_fastcgi;
+
+ types {
+ application/octet-stream rrd;
+ }
+
+ server {
+ listen 8080 default;
+ server_name localhost;
+
+ access_log nginx.localhost.access.log;
+ error_log nginx.localhost.error.log;
+
+ gzip_types application/octet-stream;
+
+ location / {
+ root .;
+ index index.html;
+ }
+
+ location /data {
+ alias /var/lib/collectd/rrd/aziz;
+ autoindex on;
+ }
+ }
+}