logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 8eff3aa0a49bbbdfdce47c6e81961c43323c9e40
parent a9fd41e4c5fc8e53b0d1787308e5d709aee475f9
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  7 Apr 2023 14:00:04 +0200

nginx_autoindex.xsl.in: Add nginx config snippet

Diffstat:

Mnginx_autoindex.xsl.in11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/nginx_autoindex.xsl.in b/nginx_autoindex.xsl.in @@ -1,5 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" version="1.0" xml:space="preserve" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> +<!-- + try_files $uri … @autoindex =404; + + error_page 403 = @autoindex; + location @autoindex { + autoindex on; + autoindex_format xml; + xslt_string_param document_uri "$document_uri"; + xslt_stylesheet /srv/web/hacktivis.me/nginx_autoindex.xsl; + } +--> <xsl:import href="templates/en/nav.xsl"/> <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/list"><xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>