Traccar modern template not working if configure Reverse Proxy with subfolder

jasonlaua year ago

Traccar modern template not working if configure Reverse Proxy with subfolder

Example, I have 2 traccar running in docker container with different Web UI port
traccar 1 - 8085
traccar 2 - 8086
both traccar serves different group of people

traccar 1
Reverse proxy https://abc.com/traccar1/ -> http://1.2.3.4:8085

traccar 2
Reverse proxy https://abc.com/traccar2/ -> http://1.2.3.4:8086

direct access without reverse proxy works, but not working with reverse proxy due to using subfolder.

upon checking, modern template is using path root to refer to all the files example /style.css and /static/...
if this runs on reverse proxy, it will refer to the root domain which is https://abc.com/ and escaped subfolder name.

is there any fixes for that?

Anton Tananaeva year ago

Have you recompiled the app to support a subfolder?

jasonlaua year ago

no i havent. i was thinking if there's any workaround so that I dont have to keep doing that if there's a new version of traccar in the future

Anton Tananaeva year ago

You can probably automate it, but you do need to recompile.