Device connection through https fails

koeksal foerne6 years ago

The webif https connection works well, only the client fails to connect.
I am mapping port 55056 to port 5055.

<IfModule mod_ssl.c>
        <VirtualHost *:443>

                ServerName 192.168.7.222
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                ProxyPass /api/socket ws://localhost:8082/api/socket
                ProxyPassReverse /api/socket ws://localhost:8082/api/socket

                ProxyPass / http://localhost:8082/
                ProxyPassReverse / http://localhost:8082/

                SSLEngine on
                SSLCertificateFile /etc/apache2/ssl/apache.crt
                SSLCertificateKeyFile /etc/apache2/ssl/apache.key

        </VirtualHost>


 <VirtualHost *:55056>

                ServerName 192.168.7.222
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                ProxyPass / http://localhost:5055/
                ProxyPassReverse / http://localhost:5055/

                SSLEngine on
                SSLCertificateFile /etc/apache2/ssl/apache.crt
                SSLCertificateKeyFile /etc/apache2/ssl/apache.key

        </VirtualHost>

</IfModule>

When i call https://myurl.com:55056 in the browser a connect in the traccar-server logfile is shown:

2017-12-10 15:03:57  INFO: [AAD67EF2] connected
2017-12-10 15:03:57 DEBUG: [AAD67EF2: 5055 < 192.168.7.222] HEX: 474554202f20485454502f312e310d0a486f73743a2031393
22e3136382e372e3232323a35353035350d0a557365722d4167656e743a204d6f7a696c6c612f352...

I am using Traccar Client 5.5 on Android where i put in https://myurl.com:55056 to connect to, but the connect isn't visible in the logfile and the App
tells me that the connection has failed.
If I switch back everything to unencrypted traffic again, everything works as expected.

Anton Tananaev6 years ago

What's on the status screen in the app?

How come you don't have a DNS server name? Is certificate valid?

koeksal foerne6 years ago

The status screen on the app says: "transfer failed"

Does the app check for a vaild certificate? I use self signed certificate.

The Server is running at home on an ubuntu machine, where the ports are forwarded to the outside.

Anton Tananaev6 years ago

Obviously you need a valid certificate.

koeksal foerne6 years ago

Would it be enough to import the certificate on the android device?

Anton Tananaev6 years ago

I'm not sure. Possibly.

koeksal foerne6 years ago

Thanks a lot, i will try, Could you tell me please how the app checks if a certificate is valid or not?

Anton Tananaev6 years ago

It doesn't. Android system does it.

koeksal foerne6 years ago

A certificate from "Let's encrypt" did the trick.
I have to try if it would also work for the "Traccar Manager"-App.