ejp-rd-vp/FiaB

Add documentation: How to prepare graphdb for reverse proxy

jagerda opened this issue · 0 comments

problem

accessing graphdb through a reverse proxy on a custom path can mess up the entire graphdb-ui if you haven't prepared graphdb for that. Example: Here, graphdb is accessed through a apache2 reverse proxy on the path /graphdb-ctsr
grafik

solution

In any case (a or b): For a production-setup, you must of course put in the real URI (not localhost) and https instead of http

a) when using the ontotext-image and docker-compose like it's done e.g. in FAIR-ready-to-go-folder, then you need to configure Dgraphdb.external-url in the CMD that will be executed in the container, e.g. like this:

  graphdb:
    image: ontotext/graphdb:10.1.2
    restart: always
    hostname: graphdb-ctsr
    command: ["-Dgraphdb.home=/opt/graphdb/home -Dgraphdb.external-url=http://localhost/graphdb-ctsr"]
    ports:
      - 7201:7200
    volumes:
      - fair-data-point-ctsr:/opt/graphdb/home
    networks:
      - default

b) when using a Dockerfile to build a local graphdb-image based on a graphdb-zip then within the Dockerfile you need to
replace the
CMD ["-Dgraphdb.home=/opt/graphdb/home"]
with something like
CMD ["-Dgraphdb.home=/opt/graphdb/home -Dgraphdb.external-url=http://localhost/graphdb-ctsr"]