I think the best way is to fix it in the code. Send me a pull request if you manage to do that.
Thanks. I have done it this way for the time being and it is working for my needs. The order is significant.
ProxyPass /tracker/ http://tracker:8082/
ProxyPassReverse /tracker/ http://tracker:8082/
ProxyPass /api/socket ws://tracker:8082/api/socket
ProxyPassReverse /api/socket ws://tracker:8082/api/socket
ProxyPass /api/ http://tracker:8082/api/
ProxyPassReverse /api/ http://tracker:8082/api/
ProxyPass /l10n/ http://tracker:8082/l10n/
ProxyPassReverse /l10n/ http://tracker:8082/l10n/
I'm only viewing last location and track logs for existing devices at the moments. So more urls may need to be handled for full function.
I have changed everything to use relative URLs, so next version should work without mapping socket, api and l10n folders separately.
That's great news. Thank you!
Hi,
Thank you for creating traccar, Anton.
I have traccar running on one host and want to proxy it via a subdir in apache, running on another host.
I have successfully proxied traccar from / based on the suggested apache conf.
Now I'm trying to do it using a subdir (/tracker/):
However some of the url's the browser encounters are relative to / e.g. /l10n/.
I handled this with another specific proxy config, then I encounter others. I'd rather not add more rules as it might break some other application on the apache server in future.
What's the best way to manage this? Should I be looking at SetOutputFilter and/or ProxyHTMLURLMap?
Many thanks.