Hello,
I have a librenms current git (as of 29 Sept) running in subdirectory with apache.
So far so good, my config is as follows:
.env
file
APP_URL=/librenms/
config.php
file
$config['base_url'] = "/librenms/";
Virtualhost file
Note that the path is not /opt/librenms because of specific path requirements in my project.
There’s a symlink from /opt/librenms to /var/www/librenms.local/ftp/www in order for cron scripts to work without modification.
Alias /librenms /var/www/librenms.local/ftp/www/html
<Directory "/var/www/librenms.local/ftp/www/html">
Options FollowSymLinks MultiViews
AllowOverride None
DirectoryIndex index.php
RewriteEngine on
RewriteBase /librenms
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php)
RewriteRule ^api/v0(.*)$ api_v0.php/$1 [L]
RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php)
RewriteRule ^(.*)$ index.php
Everything works so far, including RRD graphs, unless I click on a graph.
The link on the RRD graphs points to something like https://myserver.tld/librenms/librenms/graphs/lazy_w=653/to=1601397600/device=1/type=device_bits/from=1601311200/legend=no/
which has the subdirectory twice and fails with a 404 error generated by Laravel.
I’ve reloaded apache just to be sure, cleaned the routing cache with sudo -u librenms php artisan route:clear
, but can’t figure out where the problem could be.
Can someone point me in the right direction please ?
Best regards.
System: CentOS 8.2, PHP 7.4.10 (remi), Python 3.6.8, Apache 2.4.37-21