Symlinked files with RESTXQ
Thursday, 7 April 2016 · 3 messages · last reply 8 Apr 2016
LJ
Lars Johnsen7 Apr 2016 18:59 #
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
CG
Christian Grün8 Apr 2016 09:03 #
Hi Lars,
Quoted text · Lars Johnsen · 5 lines
> 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
JG
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
Quoted text · Lars Johnsen · 18 lines
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 >
Written for BaseX 8.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery