http redirects to demo.traccar.org

jf2 years ago

Hi guys
i just setup traccar on a vps, with apache for ssl. my problem is that when i try to access it with http it redirect me to demo.traccar.org which is not a behaviour i want. I want to redirect to https.

Track-trace22 years ago

How about showing you apache config ?

jf2 years ago

which one do you want to see? le-redirects?

jf2 years ago
GNU nano 6.2                                                                                               le-redirect-gpsxyz.com.conf                                                                                                        <VirtualHost *:80>
  ServerName gpsxyz.com
  ServerAlias www.gpsxyz.com

  Redirect permanent / https://gpsxyz.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName gpsxyz.com
  ServerAlias www.gpsxyz.com

  Protocols h2 http/1.1

  <If "%{HTTP_HOST} == 'www.gpsxyz.com'">
    Redirect permanent / https://gpsxyz.com/
  </If>

  # SSL Configuration

  # Other Apache Configuration

</VirtualHost>
Track-trace22 years ago

How about show everything that could be the cause ?

jf2 years ago
  GNU nano 6.2                                                                                                     traccar.conf                                                                                                              <VirtualHost *:80>
  ServerName demo.traccar.org
  Redirect / https://demo.traccar.org/
</VirtualHost>
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
jf2 years ago

it won't let me post the rest, but i think i just found the problem.

Track-trace22 years ago

I think so too.. this should not be in your conf.

ServerName demo.traccar.org
Redirect / https://demo.traccar.org/
jf2 years ago

should i delete it or just change it to my domain?

jf2 years ago

i changed it to my domain, everything solved now. thanks.

Track-trace22 years ago

Good luck with it..