How could i set up nginx as a proxy to expose the rest api to port 80? I have: server { listen 80;
location / { proxy_pass http://212.71.232.36:8984/rest; proxy_set_header Authorization "Basic YWRtaW46YWRtaW4="; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; } } which works correctly for root, but lets say i tried server { listen 80;
location /hello/world { proxy_pass http://212.71.232.36:8984/rest/hello/world; proxy_set_header Authorization "Basic YWRtaW46YWRtaW4="; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; } } I get: Database 'hello' was not found.
Ideally I’d like a catch all so that the rest api works from this I.P.
proxy_pass http://212.71.232.36:8984/rest;
I am not conversant with Nginx, but maybe you need to add a slash to the URL? If not, maybe the nginx guys can help you?
I get: Database 'hello' was not found.
This simply indicates that the database you specified in the URL does not exist.
basex-talk@mailman.uni-konstanz.de