It is not that http:// and https:// work at the same time. In both cases a request is being made to port
8080. In the first case the browser is instructed to make a plain HTTP request to port
8080, in the second case, the browser is instructed to make a HTTP over TLS request to port
That is why you see the TLS handshake error in the logs when your browser makes a plain HTTP request. In the eyes of the server it receives a “garbage” and it stops there.
In essence what would be needed is to serve both HTTP and HTTPS on the same port (currently with TLS certificates, it is TLS only). There are ways to do this, but I’m not sure if this should be supported by LoRa App Server. For some examples, see: https://groups.google.com/forum/#!topic/golang-nuts/4oZp1csAm2o.
A better solution would be to put NGINX as proxy in front of LoRa App Server. NGINX would:
The reason why LoRa App Server is using port 8080 is that it is an unprivileged port. As LoRa App Server runs (when using the
.deb package) under a non-root user, additional commands must be executed to let it bind to port 443. This is easy, but my experience is that you might forget this on an update and it would fail to start.