Reputation: 271
I have a default LibreNMS install on a fresh Debian Jessie server running nginx, but the default landing page (since there's no other virtual hosts) just shows a blank page. My nginx config in /etc/nginx/sites-available/default is like:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /opt/librenms/html;
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
location / {
try_files $uri $uri/ @librenms;
}
location ~ \.php {
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location @librenms {
rewrite api/v0(.*)$ /api_v0.php/$1 last;
rewrite ^(.+)$ /index.php/$1 last;
}
}
The nginx -t passed, and nothing in /opt/librenms/logs/error_log
, just an entry showing the browser I accessed from in /opt/librenms/logs/access_log
. netstat shows nginx listening on port 80. What am I missing?
Upvotes: 0
Views: 1275
Reputation: 1
I am using LibreNMS on ubuntu/nginx server without any problem
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /opt/librenms/html;
Could you change the this part (given above) of your conf, after backing up, like below.
listen 80;
server_name 192.168.X.X;
root /opt/librenms/html;
Please don't forget to change server name IP address to your server IP. Then please reload.
# nginx -t
# nginx -s reload
Upvotes: 0
Reputation: 271
I never got Nginx working, but switched to Apache2.4 and got it working in 10 minutes.
Upvotes: 0