From b6cfcfbcaa0459b39c5d581c103bfa031b2e02cd Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 28 Aug 2013 10:51:43 +0200 Subject: [PATCH] More info for a proper, fancy-url lighttpd setup --- lighttpd.conf.example | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lighttpd.conf.example b/lighttpd.conf.example index b8baafc9e3..99b544952d 100644 --- a/lighttpd.conf.example +++ b/lighttpd.conf.example @@ -1,2 +1,16 @@ -# Add this line to lighttpd.conf to enable pseudo-rewrites using 404s -server.error-handler-404 = "/index.php" +# if you're using vhosts, you should have per-vhost server.document-root settings too +#$HTTP["host"] =~ "^your\.domain\.com$" { + # NOTE: fastcgi/cgi/fpm config here if you're using per-user cgi/fpm + + dir-listing.activate = "disable" + url.rewrite-once = ( + "^/(.*)\.(.*)" => "$0", + "^/(avatar|file|js|plugins|theme)/" => "$0", + "^/(.+)$" => "/index.php/$1", + ) + + # Add this line to lighttpd.conf to enable pseudo-rewrites using 404s + # (required for fancy URLs) + server.error-handler-404 = "/index.php" +#} +