diff --git a/README.md b/README.md index 951443c..2b1f5d4 100644 --- a/README.md +++ b/README.md @@ -413,6 +413,11 @@ I don't support this feature for the general user base. This information is only for people who could figure it out from the source code anyhow, so that they don't have to spend as much time figuring it out. +If you're using --write-json-globe-index with tar1090, you might be interested in tar1090 +using the readsb API to get data, it's less requests and usually more efficient, +for details see the file nginx-readsb-api.conf +(this needs adding to your existing nginx tar1090 configuration, this is only for people who really know their stuff anyway) + ## A separate instance with longer data retention for gauging range If this seems too complicated for you or you don't want a 2nd instance, changing / adding PTRACKS=24 to the /etc/default/tar1090 configuration should also extend the history (for /?pTracks only). diff --git a/nginx-readsb-api.conf b/nginx-readsb-api.conf new file mode 100644 index 0000000..7102deb --- /dev/null +++ b/nginx-readsb-api.conf @@ -0,0 +1,19 @@ +# tar1090 needs to know to use the API as data source, readsb will signal it when you add this option: +# readsb add option: --tar1090-use-api + +location /tar1090/re-api/ { + gzip on; + proxy_http_version 1.1; + proxy_max_temp_file_size 0; + proxy_set_header Connection $http_connection; + proxy_set_header Host $http_host; + + # i like unix sockets + # readsb add option: --net-api-port unix:/run/readsb/api.sock + proxy_pass http://unix:/run/readsb/api.sock:/$is_args$args; + + # instead of using unix sockets, you can also use a port: + # readsb add option: --net-api-port 30152 + # proxy_pass http://127.0.0.1:30152/$is_args$args; +} +