1

I have GraphDb (standlone server version) in Ubuntu Server 16 running in localhost (with the command ./graphdb -d in /etc/graphdb/bin). But I only have ssh access to the server in the terminal, can't open Worbench in localhost:7200 locally.

I have many websites running on this machine with Ningx. If I try to access the machine's main IP with the port 7200 through the external web it doesn't work (e.g. http://193.133.16.72:7200/ = "connection timmed out").

I have tried to make a reverse proxy with Nginx with this code ("xxx" = domain):

  listen 7200;
  listen [::]:7200;
  server_name sparql.xxx.com;

  location / {
      proxy_pass http://127.0.0.1:7200;
  }
}

But all this fails. I checked and port 7200 is open in firewall (ufw). In the logs I get info that GraphDB is working locally in some testes. But I need Workbench access to import and create repositories (not sure how to do it or if it is possible without the Workbench GUI).

Is there a way to connect through the external web to the Workbench using a domain/IP and/or Nginx?

Read all the documentation and searched all day, but could not find a way to deal with this sorry. I only used GraphDB locally (the simple installer version), never used the standalone server in production before, sorry.

PS: two extra questions related: a) For creating an URI endpoint it is the same procedure? b) For GraphDB daemon to start automattically at boot time (with the command ./graphdb -d in graph/bin folder), what is the recommended way and configuration? (tryed the line "/etc/graphdb/bin ./graphdb -d" in rc.local but it didn't worked).

1 Answer 1

3

In case it is usefull for someone, I was able to make it work with this Nginx configuration:

server {
  listen 80;
  server_name sparql.xxxxxx.com;

  location / {
        proxy_pass http://localhost:7200;
        proxy_set_header Host $host;
  }
}

I think it was the "proxy_set_header Host $host;" that solved it (tried the rest without it before and didn't worked). I think GraphDB uses some headers to set configurations, and they were not passing.

I wounder if I am forgetting something else important to forward in the proxy, but in this moment the Worbench seams to work and opens in the domain used "sparql.xxxxxx.com".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.