Thanks for sharing this.
This is great, thank you!
One little problem I'm encountering - since I'm new to nginx and don't fully understand it, I'm sure you could be of help.
I keep getting the websocket connection error, and assume it has to do with me passing the location. Since I'm not running traccar in "location /", but rather "location /traccar/", I think I messed up the way the /api section is passed on.
location /traccar/ {
include snippets/proxy-params.conf;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://192.168.178.246:8082/;
}
location /traccar/api/socket {
proxy_cache_bypass $http_upgrade;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://192.168.178.246:8082/api/socket;
}
try to writing "Upgrade" with uppercase letter. So, this:
proxy_set_header Connection "upgrade";
become
proxy_set_header Connection "Upgrade";
Oh wow. That did it, thanks a lot! No more errors, runs like butter! :D
I'm trying settings to enable cors to consume the backend. any tips?
thank you, traccar works faster with nginx . This should be implemented as a official tutorial for nginx and traccar .
Please provide performance measurements that you did when compared the two.
Hello,
I used "htop" in the command line on my client vps and compare it with apache and nginix and cpu usage is a little bit less consumed with nginix . That server has more then 200 devices. If the client provide me access again or when ai install it on another vps,I will provide video.
We'll need something better than a video. Need over time measurements, so we can actually see the difference. You also said performance is better. CPU usage is completely different thing.
Ok, I will do that.
Thank you
Hello!, thanks for sharing.
I'm getting this messages in the logs:
WARN: Encountered multiple `Host` headers. Previous `Host` header already seen as `fqdn.site`, new `Host` header has appeared as `fqdn.site`. Might there be a redundant "Host" header definition or something like that?.
Hi to all,
i want to share with you my experience to use traccar on nginx server with reverse proxy.
I've create a conf file in /etc/nginx/sites-available/traccar:
then enable the conf file with a symlink:
and restart nginx
that's all!
It work great for me!
I hope this should useful for the others!
Cheers,
Lorenzo