daemon off; events { worker_connections 1024; } http { server { server_name localhost; listen 7878; rewrite ^/(.*) /$1 break; proxy_ignore_client_abort on; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header Access-Control-Allow-Origin "*"; location ~ ^(/|/query)$ { proxy_pass http://oxigraph:7878; proxy_pass_request_headers on; } location ~ ^(/update|/store)$ { auth_basic "Oxigraph Administrator's Area"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://oxigraph:7878; proxy_pass_request_headers on; } } }