SSL Port Configuration 80

smsoousa6 years ago

Greetings Anton.
I've been researching some topics, but none that would clarify the doubt. Well, I'm trying to configure SSL for my Traccar instance, it works normally for Apache on port 80, when I set the Apache to port 8080 and I change the port from default. conf to 80, the system does not rise. Could you give me that light? This is my configuration of etc/apache2/sites-available/traccar. conf

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

                ServerName MyDomain
                ServerAdmin MyEmail

                DocumentRoot /var/www/html

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

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

                SSLEngine on
                SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key                

        </VirtualHost>
</IfModule>
Anton Tananaev6 years ago

Port 80 is for plain text HTTP, not for HTTPS. I'm very confused on what you are trying to do.

smsoousa6 years ago

Let me try to be more specific, I would like the Traccar to run with SSL, I did the whole procedure as it sends the documentation, however I would not like to use the port 8082 and yes the port 80 for the Traccar, when I make this change, the Traccar does not rise Example:

-It works

http://my-ip/

-Does not work

https://my-ip/

Anton Tananaev6 years ago

Have you checked logs?

smsoousa6 years ago
INFO|wrapper|Service traccar|18-10-12 21:26:43|posix_spawn pid 17667
INFO|wrapper|Service traccar|18-10-12 21:26:43|started process 17667
INFO|wrapper|Service traccar|18-10-12 21:26:43|started process with pid 17667
INFO|17667/0|Service traccar|18-10-12 21:26:44|[INFO] StandardFileSystemManager - Using "/tmp/vfs_cache" as temporary files store.
INFO|17667/0|Service traccar|18-10-12 21:26:45|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
INFO|17667/0|Service traccar|18-10-12 21:26:45|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
INFO|17667/0|Service traccar|18-10-12 21:26:45|INFO 10/12/18 9:26 PM: liquibase: Clearing database change log checksums
INFO|17667/0|Service traccar|18-10-12 21:26:45|INFO 10/12/18 9:26 PM: liquibase: Successfully acquired change log lock
INFO|17667/0|Service traccar|18-10-12 21:26:45|INFO 10/12/18 9:26 PM: liquibase: Successfully released change log lock
INFO|17667/0|Service traccar|18-10-12 21:26:45|INFO 10/12/18 9:26 PM: liquibase: Successfully acquired change log lock
INFO|17667/0|Service traccar|18-10-12 21:26:47|INFO 10/12/18 9:26 PM: liquibase: Reading from tecsat.DATABASECHANGELOG
INFO|17667/0|Service traccar|18-10-12 21:26:47|INFO 10/12/18 9:26 PM: liquibase: Reading from tecsat.DATABASECHANGELOG
INFO|17667/0|Service traccar|18-10-12 21:26:47|INFO 10/12/18 9:26 PM: liquibase: ./schema/changelog-master.xml: changelog-3.8::changelog-3.8-dropuniquetoken::author: Change set changelog-3.8::changelog-3.8-dropuniquetoken::author failed, but failOnError was false.  Error: Can't DROP 'uk_user_token'; check that column/key exists [Failed SQL: ALTER TABLE tecsat.users DROP KEY uk_user_token]
INFO|17667/0|Service traccar|18-10-12 21:26:47|INFO 10/12/18 9:26 PM: liquibase: Successfully released change log lock
INFO|17667/0|Service traccar|18-10-12 21:26:47|[main] INFO org.eclipse.jetty.util.log - Logging initialized @4029ms
INFO|17667/0|Service traccar|18-10-12 21:26:48|[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.24.v20180105
INFO|17667/0|Service traccar|18-10-12 21:26:49|[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@485ce73d{/api,null,AVAILABLE}
INFO|17667/0|Service traccar|18-10-12 21:26:49|[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.t.w.@1e0948ae{/,null,AVAILABLE}
INFO|17667/0|Service traccar|18-10-12 21:26:49|[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@22eb9cdf{HTTP/1.1}{0.0.0.0:80}
INFO|17667/0|Service traccar|18-10-12 21:26:49|[main] INFO org.eclipse.jetty.server.Server - Started @5591ms
2018-10-12 21:26:48  INFO: Starting server...
2018-10-12 21:26:49 DEBUG: Clearing history earlier than 2018-09-12 21:26:49
2018-10-12 21:27:02  INFO: [DAC94D36] connected
2018-10-12 21:27:03 DEBUG: [DAC94D36: 5023 < 216.250.125.110] HEX: 78780d0108600160209762670fcaaa240d0a
2018-10-12 21:27:03  WARN: Unknown device - 860016020976267 (216.250.125.110)
2018-10-12 21:27:03 DEBUG: [DAC94D36: 5023 < 216.250.125.110] HEX: 78781f12120a0d021a26c601ca7b60054a581700180002d40601ce00790f0fcb41c70d0a
2018-10-12 21:27:03  INFO: [DAC94D36] disconnected
2018-10-12 21:27:08  INFO: [5A53EF7B] connected
2018-10-12 21:27:08 DEBUG: [5A53EF7B: 5023 < 74.208.145.62] HEX: 78780d0108600160209762670fcccf120d0a
2018-10-12 21:27:08  WARN: Unknown device - 860016020976267 (74.208.145.62)
2018-10-12 21:27:10 DEBUG: [5A53EF7B: 5023 < 74.208.145.62] HEX: 78781f12120a0d021b0bc601ca7b60054a581700180002d40601ce00790f0fcd1f570d0a
2018-10-12 21:27:41 DEBUG: [5A53EF7B: 5023 < 74.208.145.62] HEX: 78781f12120a0d021b29c601ca7b60054a581700180002d40601ce00790f0fce866e0d0a
2018-10-12 21:28:11 DEBUG: [5A53EF7B: 5023 < 74.208.145.62] HEX: 78781f12120a0d021c0bc601ca7b60054a581700180002d40601ce00790f0fcfb4880d0a
Anton Tananaev6 years ago

Traccar is clearly working.

smsoousa6 years ago

It actually works on HTTP, when I switch to HTTPS, it doesn't load, that's my question. I'd like him to turn with SSL.