Marijn,

When Fuseki is serving plain files, it is actually normal Jetty that is sorting that out. Fuseki looks at incoming requests and if they are for an installed dataset (it's a servlet filter) or the admin API operations.

Otherwise the request passes through to Jetty's default static file handling so what you are seeing is the default behaviour of Jetty. This includes file requests for HTML files and CSS files for the admin UI.

You can supply a Jetty configuration file to the server at startup. It might be easier to avoid symbolic links within the webapp area. Or to serve them from a different HTTP server (e.g. with a reverse proxy).

        Andy

Jetty documentation:
http://www.eclipse.org/jetty/documentation/current/serving-aliased-files.html

which includes discussions of the issues that arise.

On 28/09/16 17:27, Marijn Schraagen wrote:
I have Fuseki 2.4.0 running as a standalone server:
marijn@mymachine:/my/path/to/apache-jena-fuseki-2.4.0$ ./fuseki-server
--port=3033
[...]
[2016-09-28 14:47:50] Server     INFO  Started 2016/09/28 14:47:50 CEST
on port 3033

I have directory symlinks in my webapp directory:
marijn@mymachine:/my/path/to/apache-jena-fuseki-2.4.0/webapp$ ls -l
[...]
lrwxrwxrwx 1 root   root      32 sep 28 17:02 mydir1 ->
/my/path/to/first/dir/
lrwxrwxrwx 1 root   root      35 sep 28 17:03 mydir2 ->
/my/path/to/second/dir/

Fuseki shows the contents of the directories in a browser:
$ curl http://localhost:3033/mydir1/
<HTML><HEAD><LINK HREF="jetty-dir.css" REL="stylesheet"
TYPE="text/css"/><TITLE>Directory: /iacqueries/</TITLE></HEAD><BODY>
<H1>Directory: /mydir1/</H1>
<TABLE BORDER=0>
<TR><TD><A HREF="/mydir1/../">Parent
Directory</A></TD><TD></TD><TD></TD></TR>
<TR><TD><A HREF="/mydir1/myfile1">myfile1&nbsp;</A></TD><TD
ALIGN=right>86351 bytes&nbsp;</TD><TD>Sep 21, 2016 1:20:18 PM</TD></TR>
<TR><TD><A HREF="/mydir1/myfile2">myfile2&nbsp;</A></TD><TD
ALIGN=right>9515 bytes&nbsp;</TD><TD>Sep 28, 2016 5:40:54 PM</TD></TR>
[...]

However, I cannot access the files inside of the directory:
$ curl http://localhost:3033/mydir1/myfile1
Error 404: Not Found


Fuseki - version 2.4.0 (Build date: 2016-05-10T11:59:39+0000)

How can I make Fuseki follow the symbolic links?

Thanks in advance,
Marijn

Reply via email to