Dear all
What must be done to access symlinked files when using BaseX as http server?
The scenario is that a fairly large collection of audio-files are accessed using BaseX which serves them up over http. However, it seems that symlinking (the folder with audio files exists as a symlinked copy in the static directory of the BaseX web folder) prevents the browser from accessing them. Is there a parameter in the settings I have overlooked?
Best, Lars G. Johnsen National Library of Norway
Hi Lars,
The scenario is that a fairly large collection of audio-files are accessed using BaseX which serves them up over http. However, it seems that symlinking (the folder with audio files exists as a symlinked copy in the static directory of the BaseX web folder) prevents the browser from accessing them. Is there a parameter in the settings I have overlooked?
I may need some more information to understand the potential problem. You are writing that the browser cannot access the symlinked files.
The browser will retrieve files from a server, which will talk to a web server (which is Jetty in the BaseX default distribution), which will eventually communicate with BaseX if a RESTXQ URL was requested. Is it really RESTXQ that tries, but fails to access the symlinked files, or it is Jetty (or the web server of your choice)? How does your web.xml file look like (see also [1])?
Cheers, Christian
[1] http://docs.basex.org/wiki/Web_Application#Available_Services
Hi!
You are probably looking for a servlet configuration in "web.xml":
<servlet> <servlet-name>default</servlet-name> <init-param> <param-name>acceptRanges</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>aliases</param-name> <param-value>true</param-value> </init-param>
...
"aliases=true" allows symlinks, "acceptRanges=true" activates HTTP Range Requests (for MP-4 etc.) under the "/static" directory.
Best, Jochen
Am 4/7/2016 um 6:59 PM schrieb Lars Johnsen:
Dear all
What must be done to access symlinked files when using BaseX as http server?
The scenario is that a fairly large collection of audio-files are accessed using BaseX which serves them up over http. However, it seems that symlinking (the folder with audio files exists as a symlinked copy in the static directory of the BaseX web folder) prevents the browser from accessing them. Is there a parameter in the settings I have overlooked?
Best, Lars G. Johnsen National Library of Norway
basex-talk@mailman.uni-konstanz.de