jarischaefer / docker-librenms

Docker image for LibreNMS
MIT License
115 stars 38 forks source link

HTTPS/SSL not working per instructions in doc #127

Closed wielspin closed 3 years ago

wielspin commented 3 years ago

Pulled latest on 04-12-2020 and LibreNMS displays version 1.70.1.

Followed the DockerHub documentation and got LibreNMS working without any issues (including syslog). Tried to enable HTTPS by mounting ssl.crt and ssl.key, configuring the port and editing the base_url. However after starting the container nginx does not present the site on the HTTPS port (HTTP port still working).

When i console into the container i see the ssl.crt and ssl.key were correctly mapped so i checked wether the HTTPS site was enabled in nginx "sites-enabled". It wasn't, only the HTTP site was there. So per instruction (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04) i sym linked the HTTPS site to "sites-enabled". And after nginx restart, i can now use LibreNMS via the HTTPS port correctly.

I am guessing i will lose this whenever i update the image and restart the container.

Did i do something wrong in my setup for this not to work "out-of-the-box"?

jarischaefer commented 3 years ago

Did you remove (docker rm) the container before restarting? Unfortunately, the startup scripts do not refresh the configuration unless you fully remove the container. I am planning to address this.

wielspin commented 3 years ago

@jarischaefer As per your suggestion i have removed the container fully. Recreated it including HTTPS port, mounting SSL files and base_url. I can confirm HTTPS works now right away without manual adjustment inside the container.

Thanks for the support and the great docker image!