I am trying to put HAproxy as frontend SSL terminator for LibreNMS, what would be the config to let HAproxy detect and reverse to backend Nginx server which is handling LibreNMS?
Right now, when i try to access the URL, https://abc.com/librenms, i get 404 error
From nginx log, i show as below:
192.168.1.3 - - [05/Dec/2018:06:10:12 +0000] “GET / HTTP/1.1” 200 396 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36”
There is a problem when you want to change the url to have a subdirectory on the proxy and not the backend. Right now the only way to fix that is to have a subdirectory on both.
Other option is to use a subdomain and you will have no issues.
so, could you please specific case about using subdirectory?
Do you mean adding to use /librenms for backend (on librenms server) and HAproxy is also using /librenms in URL https://abc.com/librenms?
thanks @murrant
Yes, i tried your recommend, but it didn’t work.
In addition, i also tried with following options, but not work as well.
$config[‘base_url’] = “/librenms/”
APP_URL=/librenms/
APP_TRUSTED_PROXIES=192.168.1.1