summaryrefslogtreecommitdiffstats
path: root/files/etc/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'files/etc/nginx')
-rw-r--r--files/etc/nginx/nginx.conf31
-rw-r--r--files/etc/nginx/sites-enabled/munin29
2 files changed, 60 insertions, 0 deletions
diff --git a/files/etc/nginx/nginx.conf b/files/etc/nginx/nginx.conf
new file mode 100644
index 0000000..1634164
--- /dev/null
+++ b/files/etc/nginx/nginx.conf
@@ -0,0 +1,31 @@
+worker_processes 4;
+pid /tmp/nginx.pid;
+error_log /proc/self/fd/2 warn;
+
+events {
+ worker_connections 768;
+ # multi_accept on;
+}
+
+http {
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ keepalive_timeout 65;
+ types_hash_max_size 2048;
+
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+ #client_body_temp_path /tmp/nginx/temp;
+ #proxy_temp_path /tmp/nginx/proxy;
+
+ access_log /proc/self/fd/1;
+ error_log /proc/self/fd/2;
+
+ gzip on;
+ gzip_disable "msie6";
+
+ include /etc/nginx/conf.d/*.conf;
+ include /etc/nginx/sites-enabled/*;
+}
diff --git a/files/etc/nginx/sites-enabled/munin b/files/etc/nginx/sites-enabled/munin
new file mode 100644
index 0000000..4dc9764
--- /dev/null
+++ b/files/etc/nginx/sites-enabled/munin
@@ -0,0 +1,29 @@
+server {
+ listen 8080 default_server;
+ server_name munin;
+
+ access_log /proc/self/fd/1;
+ error_log /proc/self/fd/2;
+
+ location /munin/static {
+ alias /etc/munin/static;
+ }
+
+ location ^~ /munin/ {
+ fastcgi_split_path_info ^(/munin)(.*);
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_pass 127.0.0.1:9001;
+ include fastcgi_params;
+ }
+
+ location ^~ /munin-cgi/munin-cgi-graph/ {
+ fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_pass 127.0.0.1:9000;
+ include fastcgi_params;
+ }
+
+ location / {
+ rewrite ^/$ munin/ redirect; break;
+ }
+}