Skip to content

Instantly share code, notes, and snippets.

@QROkes
Last active July 12, 2024 04:41
Show Gist options
  • Save QROkes/2698aace591dc89b144ce7173b2dcdaa to your computer and use it in GitHub Desktop.
Save QROkes/2698aace591dc89b144ce7173b2dcdaa to your computer and use it in GitHub Desktop.
Nginx (Reverse Proxy) Configuration file for Traccar GPS
server {
listen 80;
listen [::]:80;
server_name domain.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect http://localhost:8082/ /;
proxy_redirect ws://localhost:8082/api/socket /api/socket;
proxy_pass http://localhost:8082/;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment