We’re seeing 404 | Not Found on the latest LibreNMS. We use a virtual host directive as the web server hosts other content as part of a tools/info service on the same host -
Component | Version
--------- | -------
LibreNMS | 1.65-29-g32f72bc1a
DB Schema | 2020_06_23_00522_alter_availability_perc_column (170)
PHP | 7.2.24-0ubuntu0.18.04.6
Python | 3.6.9
MySQL | 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool | 1.7.0
SNMP | NET-SNMP 5.7.3
====================================
[OK] Composer Version: 1.10.8
[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.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
html/.htaccess
I noticed this issue after having restarted the services while upgrading oxidized.
LibreNMS is running behind a reverse proxy with a subbdirectory.
Have played with all parameters I could find in the documentation.
Forcing the URL manually seems to work but has than issues with related files like images and .js files.
Forcing DirectoryIndex manually works, seems not to be a web server (apache2.4) configuration issue.
Well I’m not particularly sure how this LegacyController is supposed to work at all anyway. If you look around line 56, you’ll see that it’s setting $vars['page'] = basename($vars['page'] ?? ''); despite $vars never being set anywhere before in this scope. It’s always going to abort with a 404.
I guess the million dollar question is then: Why is the index route getting sent to LegacyController when it should be getting sent to OverviewController. Interestingly enough, you can resolve this issue by doing sudo -u librenms php artisan route:clear. The dashboard loads just fine if the routes aren’t cached. If you then cache them again, you’ll get a 404 on the index page.