Docunext


Perl AutoIndex Apache2 AutoIndex XSLT

April 16th, 2008

Perl powers some very handy applications, and based upon the success I'm having with svnweb, I'm going to give Apache::AutoIndex a try.

The Apache2 autoindex works, but it is really finicky and I had a hard time getting it to work. It will be nice to have a more flexible and robust tool for indexing public directories.

To install this on debian I had to install libapache-mod-perl, apache-dev and libapreq2-dev, libapreq, and . While debugging, I also found Apache::OpenIndex.

Hmmm, this is not working out... it seems like both AutoIndex and OpenIndex only work with apache 1.3.

AWESOME: This is what I was looking for:

http://search.cpan.org/~nicolaw/Apache2-AutoIndex-XSLT-0.03/lib/Apache2/AutoIndex/XSLT.pm

This is exactly what I was looking for. I was able to get it up and running in only a few minutes, and it works fine. Its a lot like the subversion xsl index method.

To render the XSL on the server side:

apt-get install libxml-libxslt-perl

apache2.conf:

PerlLoadModule XML::LibXML
PerlLoadModule XML::LibXSLT
Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022