[SOLVED]Httpupload ERROR


#1

Text messages work in app. Files upload gives error.
Httpupload container port is exposed. Can telnet to ip:8828.
Domain is not existing. Should HTTPUPLOAD URL contain IP address?

HTTP listen port

HTTPUPLOAD_LISTEN_PORT=8828

HTTP URLs

HTTPUPLOAD_PUT_URL=https://clubhouse.motorbende.net/media
HTTPUPLOAD_GET_URL=https://clubhouse.motorbende.net/media


#2

The listen port is how the http server inside Docker is exposed out of Docker itself. The URLs below instead are the ones visible to Kontalk clients. You may use IP addresses there, but remember you need to map somehow https://ip:443/media to http://localhost:8828/ (e.g. nginx or Apache). Here’s what we use on Lighttpd (but we’ll soon switch to nginx):

$SERVER["socket"] == "0.0.0.0:443" {
  $HTTP["host"] == "zeta.kontalk.net" {
    $HTTP["url"] =~ "^/media/" {
      proxy.server = ("" => ("servername:443" => ( "host" => "127.0.0.1", "port" => 7828 )))
    }
  }
}

The URLs visible by clients in this case would be https://zeta.kontalk.net/media


#3

Daniele,
Thank you for the hint. It took a few attempts in NGINX but now the HTTPUPLOAD works fine too.
This quick and dirty solution is what I did in NGINX to get it working.

server {
        # SSL configuration
        #
         listen 443 ssl default_server;
         listen [::]:443 default_server;

         ssl_certificate     /home/rene/kontalk-server/config/certificate.pem;
         ssl_certificate_key /home/rene/kontalk-server/config/privatekey.pem;

	 root /var/www/html/ ; 
      
 	 server_name _;

	 location /media {
                proxy_pass http://localhost:8828;
              }
	}

Hope I can be of any assistance to the project in the future.