I have having an issue with hosting a Cacti installation from NginX.
I have cacti installed under /usr/share/cacti and the below block in my default NginX config file.
location / {
root /var/www;
index index.html index.htm
}
location /cacti {
root /usr/share/cacti;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$request_filename;
}
}
The problem as I can see is that the NginX error log is full of errors that "/usr/share/cacti/cacti/index.php" doesn't exist.
For now I have simply added the extra directory to cacti, but I can't figure how to get NginX to 'drop' the '/cacti/' prefix from the URI when processing the page requests (and passing them on to PHP5-FPM)
Any help would be appreciated.