Skip to content
Snippets Groups Projects

Nginx proxy for private triple store

Overview

Configuration of NGINX proxy server that allows for read-only requests without the need to provide credentials to the database. This is done by appending Authorization header to request header. Server accepts HTTP GET read-only requests to specified endpoint. Requests to any other locations in proxied server will be ignored. According to SPARQL Update standard, update queries can only be performed through POST requests, so this requirement restricts allowed operations to read-only queries (SELECT, DESCRIBE, ASK, CONSTRUCT).

Note that this solves quite general problem, so it can be easily adjusted for any other proxied server.

Configuration and launching

  1. Create tdb_config.env file from tdb_config.env.tmpl file, providing proper values,
  2. docker-compose up
  3. Server will be available at localhost:31035 and expose one specific endpoint specified in TDB_REPO_PATH.

There is also localhost:38090/nginx_status endpoint, providing basic nginx status and basic stats (check stub_status.)

Demo

demo.sh contains few curl commands demonstrating use of this server.