NginX & Munin - Location and error 404
- by user1684189
I've a server that running nginx+php-fpm with this simple configuration:
server {
listen 80;
server_name ipoftheserver;
access_log /var/www/default/logs/access.log;
error_log /var/www/default/logs/error.log;
location / {
root /var/www/default/public_html;
index index.html index.htm index.php;
}
location ^~ /munin/ {
root /var/cache/munin/www/;
index index.html index.htm index.php;
}
location ~\.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/default/public_html$fastcgi_script_name;
}
}
but when I open ipoftheserver/munin/ I recieve a 404 error (when I request ipoftheserver/ the files on /var/www/default/public_html are listened correctly)
Munin is installed and works perfectly. If I remove this configuration and I use this another one all works good (but not in the /munin/ directory):
server {
server_name ipoftheserver;
root /var/cache/munin/www/;
location / {
index index.html;
access_log off;
}
}
How to fix? Many thanks for your help