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:
parent
5e32c9c8eb
commit
4b435b173f
1 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue