[SOLVED] LibreNMS keeps redirecting to subdirectory


When going to http:// example .com/librenms/login I get forwarded to https:// example .com/librenms/login, which is fine.
When I try to login I get redirected to: https:// example .com/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/librenms/login

As someone might understand, that’s not supposed to happen. It was working fine before and I didn’t do any changes in the mean time.

My config:

If someone is able to advice me why this happens, I really appreciate it, thank you.

did you try the fix?


Hi @Bob_Puts, yep, sure did, no luck though. The .htaccess alert is a false positive, it’s whining that I use /librenms as a rewrite base, not /.

what if you rename the .htaccess file to _old and do a git pull? do not know if it will resolve the problem.

I did the composer command, should that suffice, or is a git pull better?

For what I know it is the same. The question is did it solve your problem?

Hi @Bob_Puts, no but I fixed my problem.
My Apache config was messed up, I had an alias for /var/www/html/librenms while still having a root directory to /var/www/html.
It worked before but somehow not, but It’s solved now.

1 Like