From Sami:
Looks like in the server the hostname check is also including the port
and usinga non-default port confuses it.
For example if I put "https-port":8080 in server.conf and go to
https://myserver:8080/api/info
the server will respond with "404 page not found". So as a workaround then
I have to modify the config file
and put "hostname":"myserver:8080". This obviously won't work correctly if
a site wants to run both https/http at the same time on different ports.