SemanticComputing / fuseki-docker

Apache Jena Fuseki with SeCo extensions
MIT License
33 stars 14 forks source link

Running behind reverse proxy #26

Closed Ineluki closed 6 months ago

Ineluki commented 6 months ago

I'm trying to find a way to run the fuseki container behind a reverse proxy and subsequent base-path (e.g. http://example.com/fuseki)

The apache docs describe it as fuseki-server [--loc=DIR] [[--update] /NAME] where NAME is the base-path.

Source: https://jena.apache.org/documentation/fuseki2/fuseki-webapp.html#fuseki-standalone-server

How can I achieve that in the config of this docker container?

yoge1 commented 6 months ago

You can configure the base name of the Fuseki service by setting the fuseki:name property of the fuseki:Service in the assembler file.

See more: https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html

Myasir92 commented 6 months ago

@yoge1 @Ineluki I am running Fuseki on Docker and using Nginx to redirect from localhost/fuseki in order to display the UI. While the application starts and functions perfectly, the UI does not load correctly in the browser. This issue arises because requests for HTML and CSS files are sent to localhost instead of localhost/fuseki. I also tried setting the service name as localhost/fuseki, but this approach was unsuccessful. Can you please provide guidance?

yoge1 commented 6 months ago

Hi @Myasir92, It seems that for the UI to work Fuseki (Fuseki as a Standalone Server) needs to be served from a URL without a path component, which means that it needs to be served from http://localhost in your case.

I'm not sure but it might be possible to serve Fuseki from http://localhost/fuseki by running Fuseki as a Web Application (WAR file), and not using this particular Docker image. The Fuseki documentation states:

It should then be renamed to the webapp name “ROOT.war” (this means there no name in the URL) or “fuseki.war” (with a name /fuseki/) or some other choice of name.

Setting the service name in the assembler file does not help here, as that only applies to a specific dataset, and not the server UI.