HowTo : SSL with Traccar under Windows

BerndFfm3 years ago

I got a new certificate from zerossl for my domain.

The solution with IIS did not work in my case because I have Windows 10 and no Windows Server.

So i downloaded nginx and startet it with the following changes in den nginx.conf :

    server {
        listen       8084 ssl;
        server_name  xddns.de;
         ssl_certificate     certificate.crt;
         ssl_certificate_key private.key;
    
        location / {
            proxy_pass http://212.223.10.158:8082;
        }

I call my web interface with https://finderwille.xddns.de:5056.

212.223.10.158 is the internal IP of my traccar PC.

So, this is a very cheap and easy way to bring https to traccar:

Greetings Bernd

BerndFfm3 years ago

Sorry, small mistake.

I call my web interface with https://finderwille.xddns.de:8084

Port 443 ist possible too.

#Bernd

BerndFfm3 years ago

The sockets are not working correctly, so the status update need several seconds.

I will report what settings you have to do.

Greetings Bernd

BerndFfm3 years ago

This is the correct config file that works with sockets :

location / {
        proxy_pass http://212.223.10.158:8082;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
}

location /api/socket {
        proxy_pass http://212.223.10.158:8082/api/socket;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
}
BerndFfm3 years ago

My app does not send all position updates via SSL to traccar. I used port 5056 and osmand protocol.

So for the devices I switch back to http. Web Interface and API works well.

#Bernd

Kabs2 years ago

how to put this in windows server 2016 and where can i found config file of nginx

please help