Traccar Modern UI change login URL

Victor Butlera year ago

Hi,

Is there a way to change the default login URL for the Traccar modern UI?

Default setup:
demo.traccar.org -> Forwards to demo.traccar.org/login

What I want to do:
demo.traccar.org -> Shows blank page (or anything else).
demo.traccar.org/custom_url -> Forwards to demo.traccar.org/login

This was possible to do in the old UI by editing the release.html and adding a custom custom_url.html file.

Anton Tananaeva year ago

There's always a way, but your new page will probably have to be part of the app. And then you will need to update the routing in the code.

Victor Butlera year ago

Yes, this is what I also thought. Still, I decided to check with you first and fine out whether it will be possible to do without recompiling the source code.

Nikolay a year ago

It might be possible, but I don't think it would be the easy option.

I guess demo.traccar.org is just for clarification and you use your own domain.

If you're using a reverse proxy, you should be able to specify a new uri for the whole traccar application.

Something like demo.traccar.org/feet
Then your login would be
demo.traccar.org/feet/login
Where in your proxy it should be like this:
Apache version:

ProxyPass "/fleet" "http://127.0.0.1:8082"
ProxyPassReverse "/fleet" "http://127.0.0.1:8082"

That's a basic one would need more work, but if you then type demo.traccar.org, you'll see what's set in Apache for Document Root and it will call something similar:
/var/www/html/my_site/index.html