roles/nginx: Fix munin.conf for nginx_status

This config stopped working a few years ago probably when hosts started
getting IPv6 and we need to allow ::1. Make sure we're only listening
on local loopback interfaces also.
This commit is contained in:
Alan Orth 2020-03-10 12:23:12 +02:00
parent 2dc195b33c
commit e169a3744a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -1,6 +1,8 @@
# nginx status module + munin aliases # nginx status module + munin aliases
server { server {
listen localhost:80; listen 127.0.0.1:80;
listen [::]:80;
server_name localhost;
log_not_found off; log_not_found off;
@ -8,6 +10,7 @@ server {
stub_status on; stub_status on;
access_log off; access_log off;
allow 127.0.0.1; allow 127.0.0.1;
allow ::1;
deny all; deny all;
} }
@ -18,7 +21,6 @@ server {
location /munin/ { location /munin/ {
alias /var/cache/munin/www/; alias /var/cache/munin/www/;
index index.html
expires modified +310s; expires modified +310s;
} }
} }