Hi Smsoousa,
Delete the VirtualHost default:80 part you have added to traccar.conf.
In /etc/apache2/sites-available/000-default.conf delete everything (or comment out) and enter the below config. That will work, providing you have setup the traccar.conf correctly. I just tested it on my dev server.
<VirtualHost *:80>
ServerName sistema.tecsat.net.br
Redirect / https://sistema.tecsat.net.br/
</VirtualHost>
Fingers crossed!
Oh and remember to service apache2 restart after editing it.
Jake Stephens,
This part has nothing to do with the problem, this part is important for directing the requests coming from port 80 from the http: // XXX or http: // www requests to the https protocol!
See one of my servers, anyway you try to access it it will point to port 443
https://www.turbotracker.com.br
https://turbotracker.com.br
http://turbotracker.com.br
http://www.turbotracker.com.br
Hi Turbovix, Jake and smsoousa
I have the same problem that when trying to enter traccar through port 443 (https) the index of apache is displayed in ubuntu.
Please, if you are kind enough to tell me what was the solution you applied?
I look forward to your prompt response and help
Regards,
oM
1 - Hi, have you checked the official documentation?
https://www.traccar.org/secure-connection/
2 - If you followed the setup correctly, you can check your settings and post here. Another thing, if your server is on AWS Amazon, you should check if the traffic on port 443 is enabled.
Hello Sirs, I tried all the procedures described here, but to no avail, I gave up momentarily trying to set up, follow several steps on the internet to try some success, but to no avail.
Friend, I remember having requested access to your server to make this setting, however this has not progressed. Well, for a symbolic value I can support you, or you can hire the services of the Traccar team to configure your server correctly.
Hi Sirs,
I managed to solve the inconvenience of accessing Traccar through port 443 and that it no longer shows the Apache root.
What I did was uninstall the Apache completely and start from the beginning as indicated by the Traccar on Security guide, what I did was restart the Apache service after each instruction that I was asking for:
sudo apt-get install apache2
sudo a2enmod ssl
sudo a2enmod proxy_http
sudo a2enmod proxy_wstunnel
-sudo service apache2 restart
I do not know if it was a coincidence but that worked for me
Regards,
oM
I have the same problem, just the Apache page, I've set the ports and nothing, any tips? Thank you
Hi, I do this procedure but I have the error in browser "ERR_TOO_MANY_REDIRECTS"
my traccar.conf file:
<IfModule mod_ssl.c>
<VirtualHost _default_:80>
ServerName login.cloudgps.site
ServerAlias www.login.cloudgps.site
Redirect / https://login.cloudgps.site
</VirtualHost>
<VirtualHost _default_:443>
ServerName login.cloudgps.site
ServerAdmin ***@gmail.com
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
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias www.login.cloudgps.site
SSLCertificateFile /etc/letsencrypt/live/login.cloudgps.site/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/login.cloudgps.site/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
I really appreciate some help, regards!
Claudio, have you checked the Traccar documentation? if you follow the guidelines described there, the server will be able to work with the SSL protocol. I prefer to work with Nginx!
Yes Turbovix, I follow the guidelines step by step and I got the error "ERR_TOO_MANY_REDIRECT" in the web browser. In fact, I set my "traccar.conf" file according to your configuration, but there is some detail that is escaping me and I don't know what it is. :(
I really appreciate your help, regards!
Did you enable the module below?
# sudo a2enmod rewrite
Try this block configuration in question:
<VirtualHost _default_:80>
ServerName login.cloudgps.site
Redirect / https://login.cloudgps.site
</VirtualHost>
Yes, I installed and activated all possible modules.