lighttpd: add services.lighttpd.mod_userdir option

If true, requests in the form /~user/page.html are rewritten to take
the file public_html/page.html from the home directory of the user.

Default is off.

Patch contributed by Bjørn Forsman.
This commit is contained in:
Evgeny Egorochkin 2013-05-06 13:28:30 +03:00
parent 5e32c9c8eb
commit 4b435b173f

View file

@ -36,6 +36,11 @@ let
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )
${if cfg.mod_userdir then ''
server.modules += ("mod_userdir")
userdir.path = "public_html"
'' else ""}
${cfg.extraConfig}
'';
@ -71,6 +76,15 @@ in
'';
};
mod_userdir = mkOption {
default = false;
type = types.uniq types.bool;
description = ''
If true, requests in the form /~user/page.html are rewritten to take
the file public_html/page.html from the home directory of the user.
'';
};
configText = mkOption {
default = "";
type = types.string;