Subdirectory problems

Hi Guys,
I’m trying to set up a librenms which will run under the sub directory. But whatever I do, login page is always being redirected to /login rather than /librenms/login. What could be the issue here?
My config.php is:


And .env is:



Have you written a redirect in the apache/nginx config?

Thanks, my nginx config was the culprit and when I switched to apache and applied the config redirection worked. However after the login I always get a 404 unless I add a /index.php or /devices to the URL. Something is wrong with the .htaccess I suppose (I only changed the RewriteBase).

Nice to hear it worked partially.

With the index.php there .ist be something wrong with the RewriteRule.

Recheck your .htaccess

I think there is something wrong with the documentation, see my git diff

diff --git a/html/.htaccess b/html/.htaccess
index 608a095d8..2e5bc5d4a 100644
--- a/html/.htaccess
+++ b/html/.htaccess
@@ -20,7 +20,7 @@ AddType image/svg+xml .svg

 RewriteEngine on
-RewriteBase /
+RewriteBase /librenms
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php)

What I’ve realized is, when I request https://mydomain/librenms/ Apache rewrites the request as https://mydomain/librenms/index.php However only if I call https://mydomain/librenms/index.php?/ I can browse the homepage.
Btw, it doesn’t matter if I add a trailing slash or not to the rewritebase directive.