Change web config to use relative path for links instead of the full hostname?

We use LibreNMS locally on the network with a hostname like librenms.company.lan. We have a remote access software that creates a secure tunnel to the network that proxies the web traffic to the server using the localhost and unique port number such as https://localhost:10620. We can browse and view some pages, but most of the links are coded with the set hostname that only works inside the LAN.

Is there a way to have it create the links leaving out the base part of the URL so a link like this:
https://librenms.company.lan/device/device=1/tab=port/port=2298
would just link the relative path like this:
/device/device=1/tab=port/port=2298
This would allow the links to work no matter if we’re using the internal URL or the remote access “localhost: port” URL.
Any assistance would be greatly appreciated!!!
Thank you.

Try setting base_url to /. I do that in my dev env and it seems to work ok.

lnms config:get base_url
/

Bizarre remote software. Does it have the ability to override DNS names? If so you could remap librenms.company.lan when the tunnel is up to 127.0.0.1.

Thank you - don’t know why I didn’t see that setting when I was looking. Removing the specific URL and leaving it “/” seems to be working fine.

This is using N-able by Solarwinds remote control feature through an MSP. I’ve also seen another software “remote.it” that works similarly. Removing the base URL worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.