Last active
August 29, 2015 14:10
-
-
Save drscream/5d5634f98601a221d08a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
access_log off; | |
server { | |
listen 127.0.0.1:80; | |
server_name localhost; | |
location /nginx_status { | |
stub_status on; | |
access_log off; | |
allow 127.0.0.1; | |
deny all; | |
} | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name _; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name _; | |
location / { | |
root /var/munin/www; | |
index index.html index.htm; | |
} | |
location ^~ /munin-cgi/munin-cgi-graph/ { | |
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*); | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_pass unix:/var/run/munin/fastcgi-graph.sock; | |
include fastcgi_params; | |
} | |
location /admin { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Protocol https; | |
proxy_set_header Host $http_host; | |
proxy_set_header SCRIPT_NAME '/admin'; | |
proxy_redirect off; | |
proxy_pass http://muninadmin; | |
} | |
ssl_certificate /etc/ssl/nginx/munin.pem; | |
ssl_certificate_key /etc/ssl/nginx/munin.pem; | |
} | |
upstream muninadmin { | |
# server unix:/tmp/gunicorn.sock fail_timeout=0; | |
# For a TCP configuration: | |
server 127.0.0.1:9000 fail_timeout=0; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# munin-fastcgi | |
spawn-fcgi -s /var/run/munin/fastcgi-graph.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment