Cant load install page

Hi Guys,

I have followed the install steps very carefully and I cant get my browser to load the librenms page. It just keeps loading the default nginx page. I have tried http://10.60.0.120 and http://10.60.0.120/install. I have tried removing the ‘server’ section from the nano /etc/nginx/nginx.conf but it just breaks and doesent seem to find my librenms page at nano /etc/nginx/conf.d/librenms.conf. I have spent days on this please help.

Make sure your server_name is setup correctly as the server_name. It should match the config.d conf file. Are you running DNS? Is this the only host for the webservices?

Hi Craig,

No I am not running DNS. The server name is localhost
[[email protected] ~]# hostname
localhost.localdomain

I made sure both files said localhost next to server nam he and then restarted the nginx service. Still getting 404 not found when trying http://10.60.0.100/install

Hi Paul, You need to look at the nginx error/access logs as this should point to the issue. Check selinux, php fpm, and permissions.

Can you try just putting 10.60.0.120 as the server_name in your nginx config?

https://docs.librenms.org/Installation/Install-LibreNMS/#configure-web-server

1 Like

Thanks for the suggestion, I tried that but no luck.

Checked those logs but they didnt seem to say anything too relevant. Just trying the install process again

kinda puzzled you put 10.60.0.120 on the first post but in another post, you put 10.60.0.100. you need to make you have the correct IP in both places. the config file and in the web browser.

Yes you are right sorry, it should be 120

Hi Guys,

I eventually resolved this by pasting the librenms.conf into the middle of nginx.conf. I reloaded the nginx service and went to http://10.60.0.120/install and the librenms page loaded. I felt giddy. Here is the final config of /etc/nginx/nginx.conf. Thank you all for your help. I am little concerned it’s not by the book but whatever works I guess.

[[email protected] ~]# nano /etc/nginx/nginx.conf

#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;


keepalive_timeout  65;

#gzip  

server {

listen 80;
server_name librenms.example.com;
root /opt/librenms/html;
index index.php;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/].php(/|$) {
fastcgi_pass unix:/run/php-fpm-librenms.sock;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi.conf;
}
location ~ /.(?!well-known).* {
deny all;
}
}

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;

    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;

    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#    listen       8000;
#    listen       somename:8080;
#    server_name  somename  alias  another.alias;

#    location / {
#        root   html;

#        index  index.html index.htm;
#    }
#}


# HTTPS server
#
#server {
#    listen       443 ssl;

GNU nano 2.9.8 /etc/nginx/nginx.conf Modified

#    ssl_certificate      cert.pem;
#    ssl_certificate_key  cert.key;

#    ssl_session_cache    shared:SSL:1m;
#    ssl_session_timeout  5m;

#    ssl_ciphers  HIGH:!aNULL:!MD5;
#    ssl_prefer_server_ciphers  on;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.