From fb534a4267e3b8ba4220560d69e197421bcb356a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 23 Jul 2010 13:56:50 +0200 Subject: [PATCH] lighttpd: Make awstats available as /stats in all domains. --- etc/lighttpd/lighttpd.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/lighttpd/lighttpd.conf b/etc/lighttpd/lighttpd.conf index 4da053e..5f20c69 100644 --- a/etc/lighttpd/lighttpd.conf +++ b/etc/lighttpd/lighttpd.conf @@ -69,6 +69,19 @@ server.groupname = "www-data" # Make mysqll frontend available in all domains alias.url += ("/mysql" => "/usr/share/phpmyadmin") + +# Make stats frontend available in all domains. We do a trick with +# redirecting to awstats.pl and aliasing that, since modalias strips the +# trailing / from urls before matching (so we can't alias /stats/ +# without also redirecting /statsfoo). We don't want to put this in +# a conditional either, since that will be mutually exclusive with any +# alias.urls in conditionals for specific vhosts. +url.redirect += ("^/stats$" => "/stats/awstats.pl") +url.redirect += ("^/stats/$" => "/stats/awstats.pl") +cgi.assign += ( "/usr/lib/cgi-bin/awstats.pl" => "" ) +alias.url += ( "/stats/icon" => "/usr/share/awstats/icon" ) +alias.url += ( "/stats/awstats.pl" => "/usr/lib/cgi-bin/awstats.pl" ) + $SERVER["socket"] == ":443" { ssl.engine = "enable" # The CA certificates (in particular, this contains the intermediate -- 2.30.2