Traccar Secure Connection

neaktivni6 months ago

The same thing is happening, I have started a completely new ubuntu server 22.04 on AWS Lightsail, with the Lightsail MYSQL Database. Just installed the Traccar 6.2 App, and make it working. But the secure guide for SSL config is not working. I still get the same error when I try to get a certificate for a complete new sub.domain.name.
Please advice? Can you also try to do the same on AWS, it it free there.

neaktivni6 months ago

And also the same thing on AWS EC2

neaktivni6 months ago

no update?

neaktivni6 months ago

This is my error on the last step from the tutorial

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Aut
hority reported these problems:
  Domain: sub.domain.name
  Type:   unauthorized
  Detail: 2a02:7b40:3e4d:9e14::1: Invalid response from http://sub.domain.name/.well-known
/acme-challenge/93z1sDiDs_FsnbDUUk-RZzBoF-ZzKuEaTVrXAHgvi7s: 404

Hint: The Certificate Authority failed to verify the temporary Apache configuration chan
ges made by Certbot. Ensure that the listed domains point to this Apache server and that
 it is accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfi
le /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
neaktivni6 months ago

Hi, it is not possible, that on a clean installation, I can not configure HTTPS using the provided configuration

Anton Tananaev6 months ago

What's the domain and your server IP?

Track-trace6 months ago

When i talked about showing your config i did mean from your apache domain (not from traccar as you posted).

I'm fairly sure your Apache domain config is not correct. Since certbot cant write / acces the file.

Big chance that it has to do with your subdomain setup.

neaktivni6 months ago

Apache Config

<VirtualHost *:80>
  ServerName demo.traccar.org
  Redirect / https://c.logithia.ch/
</VirtualHost>
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>

                ServerName c.logithia.ch
                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/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        </VirtualHost>
</IfModule>

Domain c.logithia.ch, SERVER IP, 52.57.139.168

Anton Tananaev6 months ago

Your IP address does not accept connection on port 80.

neaktivni6 months ago

and I have set the the port 80 as inbound for my instance

neaktivni6 months ago

I have now reverted all, can someone set me a correct tutorial, because everything works until I need to get a certificate

Anton Tananaev6 months ago

It looks like you have A and AAAA records, but only AAAA host is accepting connections. You clearly have either DNS or some network misconfiguration that you need to figure out before you get to any SSL configuration. Obviously our tutorial assumes that you have configured your network and DNS correctly first.

neaktivni6 months ago

ok, domain register add automatically A and AAAA entries, then I am editing just A entry. I will try also to edit AAAA entry with the correct ipv6 address, which I did not set.

Anton Tananaev6 months ago

That's one of the problems. The other problem is that your IP doesn't even accept connections on port 80. This probably means that you haven't configured firewall correctly.

neaktivni6 months ago

ok, thing by thing first, I will set this thing with AAAA then I will let you know