BaseX with Apache
Thursday, 27 May 2021 · 4 messages
TT
Tim Thompson27 May 2021 17:48 #
With apologies for the not-strictly-BaseX question--but I'm running BaseX through a reverse proxy with Apache (and Let's Encrypt), and I can't figure out how to disable directory listing for the BaseX webapp/static directory. I've tried editing the apache2 conf files in the standard ways. Hoping someone here has a quick solution to share.
Thanks in advance,
Tim
--
Tim A. Thompson
Metadata Librarian
Yale University Library
BD
Bridger Dyson-Smith27 May 2021 17:59 #
Hi Tim -
What about modifying the BaseX web.xml in $basex/webapp/WEB-INF? That was you'd be disabling in Jetty instead of Apache. To be honest I have no idea if this will work, but:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>dirAllowed</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
or some variation thereof? I cribbed this from stackoverflow, naturally
(and here's where I found it: [1])Hope that's helpful, apologies if it's only noise.
Best,
Bridger
[1]
https://stackoverflow.com/questions/7217969/how-to-disable-directory-listing-for-jettys-webappcontext
Quoted text · Tim Thompson · 16 lines
On Thu, May 27, 2021 at 9:48 AM Tim Thompson <timathom at gmail.com> wrote: > With apologies for the not-strictly-BaseX question--but I'm running BaseX > through a reverse proxy with Apache (and Let's Encrypt), and I can't figure > out how to disable directory listing for the BaseX webapp/static directory. > I've tried editing the apache2 conf files in the standard ways. Hoping > someone here has a quick solution to share. > > Thanks in advance, > Tim > > -- > Tim A. Thompson > Metadata Librarian > Yale University Library > >
TT
Tim Thompson27 May 2021 18:09 #
Thanks, Bridger! Adding that param seemed to do the trick!
Best,
Tim
Quoted text · Bridger Dyson-Smith · 43 lines
On Thu, May 27, 2021 at 9:59 AM Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > Hi Tim - > > What about modifying the BaseX web.xml in $basex/webapp/WEB-INF? That was > you'd be disabling in Jetty instead of Apache. To be honest I have no idea > if this will work, but: > > <servlet> > <servlet-name>default</servlet-name> > <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class> > <init-param> > <param-name>dirAllowed</param-name> > <param-value>false</param-value> > </init-param> > </servlet> > or some variation thereof? I cribbed this from stackoverflow, naturally > (and here's where I found it: [1]) > > Hope that's helpful, apologies if it's only noise. > Best, > Bridger > > [1] > https://stackoverflow.com/questions/7217969/how-to-disable-directory-listing-for-jettys-webappcontext > > On Thu, May 27, 2021 at 9:48 AM Tim Thompson <timathom at gmail.com> wrote: > >> With apologies for the not-strictly-BaseX question--but I'm running BaseX >> through a reverse proxy with Apache (and Let's Encrypt), and I can't figure >> out how to disable directory listing for the BaseX webapp/static directory. >> I've tried editing the apache2 conf files in the standard ways. Hoping >> someone here has a quick solution to share. >> >> Thanks in advance, >> Tim >> >> -- >> Tim A. Thompson >> Metadata Librarian >> Yale University Library >> >>
LQ
Quoted text · Tim Thompson · 4 lines
On Thu, 2021-05-27 at 09:47 -0400, Tim Thompson wrote: > I can't figure > out how to disable directory listing for the BaseX webapp/static > directory.
Try putting an empty index.html file in it?
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
Written for BaseX 9.5. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery