Dashboard, "Home" Site Issues using sub-directory

Tags: #<Tag:0x00007f3b899a1c00>


A couple recent items I noticed with the webui - they seem to have changed, was sort of waiting on them to revert to the old way of working, but no joy. So capturing them here to see if others are having similar issues.

  1. the overview page / URL works fine, but if I select the LibreNMS “icon” in the upper left corner, and overview goes away (i.e. base page) -> 404, Not Found.
  2. I can manually add overview to the tail of the URL, then things work. But I do see two default dashboards?
  3. if I select any dashboard (and the URL gets /?dashboard=# appended) .=> 404, Not Found. I did find this, https://github.com/librenms/librenms/issues/6822 … but I can’t add any number, none seem to work?



I’m not seeing any of those issues.

what version are you on? Post validate please

Sure, NP! Thinking it may be a hangover due to updates over time? In any case, here is the validate output. Thanks!

[email protected]:~$ ./validate.php
Component | Version
--------- | -------
LibreNMS  | 1.66-21-g752b3e7db
DB Schema | 2020_07_29_143221_add_device_perf_index (172)
PHP       | 7.4.3
Python    | 3.8.2
MySQL     | 8.0.21-0ubuntu0.20.04.3
RRDTool   | 1.7.2
SNMP      | NET-SNMP 5.8

[OK]    Composer Version: 1.10.10
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        You can fix this with ./scripts/github-remove
        Modified Files:

Did you edit Url.php?

Also, make sure Specific URL correctly points your librenms URL in Global Settings -> System -> Server

Yes, to address another open issue (can find the link if you want that one, NP!). But just unded it (checkout to restore the file). No difference.

Checked, and it does!

Could this also be related to having a sub-path (librenms)?

Could be. To what points your LibreNMS logo upper left that you get 404?

Logo points to (same issue with or without internal domain),
http://linuxserver/librenms/ => 404 error

But if I change it to,
http://linuxserver/librenms/overview … works!



I’m almost sure its related to the sub-directory.

Did you checked this -> https://docs.librenms.org/Extensions/Sub-Directory/ ?

Yep! Confirmed, those files look correct. Just a slight delta, in config.php,
$config['base_url'] =(!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/' . 'librenms/';

But I changed it also to match the documentation, no change. The subdirectory is working fine, but not for /overview.


Im almost sure that if it fails in overview, it will fail in other places.

Also, base_url is the same as Specific URL in the webui.

At this point, I dont know what more to check…Maybe webserver logs?

Good idea! I did, they got me thinking (they are below), - - [11/Aug/2020:21:10:48 -0500] "GET /librenms/ HTTP/1.1" 404 2510 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36" - - [11/Aug/2020:21:11:00 -0500] "GET /librenms/overview HTTP/1.1" 200 88641 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"

The second one works (lots of traffic after that), but not the first. So I tried rather going to,

That works! So it seems the default file is not being set somehow? is this really on the web server, or rather on LibreNMS? I really mean that as a question, I’m not sure.


I…dont know. Sorry.

Maybe someone else could help here.

1 Like

NP, thanks for trying!

FYI, I do see in htaccess,
RewriteRule ^(.*)$ index.php
Odd that it’s not appending index.php (as it all works if I do this manually - and it used to work!).

I did also try in the apache configuration file,
DirectoryIndex index.php
But no difference.

Thanks again.

Try searching in google apache rewrite doesnt work in sub directory or something like that

Yep, tried that! And also, added the RewriteRule to apache (conf file) - no joy. It is interesting that the trailing slash is appended (and no index.php). Not sure if that’s it or not, but does seem a bit odd.

Still trying to get to the bottom of this, pulling my hair out :frowning_face:. It seems like the home page should append “overview” … do I have that right? If I manually add it, then no issue, but it’s not working that way by default.

I could be wrong, but thinking the sub-path isn’t appending this as it should.