Hello Helpers,
I am little bit lost with librenms container.
I try to get a suffix on url to be able to use a reverse proxy with an ingress apache2.
I had to be in https apache Handle this and I force laravel to be in https “\URL::forceScheme(‘https’);”
I am not able to use a subdomain.
I tried to Change
name: APP_URL
value: ‘/librenms/’
or
LIBRENMS_BASE_URL
‘/librenms/’
nothing change.
I modified the
/opt/librenms/app/Providers/RouteServiceProvider.php
public function boot()
{
//$this->configureRateLimiting();
$this->routes(function () {
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*/
Route::prefix('librenms/api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*/
Route::prefix('librenms')
->middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
});
}
I changed the url function add a suffix to change link in
/opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
if (! function_exists(‘url’)) {
/**
* Generate a url for the application.
*
* @param string|null $path
* @param mixed $parameters
* @param bool|null $secure
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
*/
function url($path = null, $parameters = [], $secure = null)
{
if (is_null($path)) {
return app(UrlGenerator::class);
}
$path='librenms/'. $path;
return app(UrlGenerator::class)->to($path, $parameters, $secure);
}
}
Some links working well some other display “404 not found”
I spent around 4 days on that issue.
I just want to be able to use a reverse proxy with apache 2 and the librenms container inclu nginx.
Do you have an easy way to do it please?