modules/services/web-servers/apache-httpd: make this module more configurable
- The new option 'apacheHttpd' determines the version of the Apache HTTP Server that's being used by this module. The default version is Apache 2.2.x, as before. - The new option 'configFile' allows users specify their own custom config file for the web server instead of being limited to the one that this module generates.
This commit is contained in:
parent
47e67f5e9c
commit
52c97adaba
|
@ -6,7 +6,9 @@ let
|
|||
|
||||
mainCfg = config.services.httpd;
|
||||
|
||||
httpd = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; };
|
||||
httpd = mainCfg.apacheHttpd;
|
||||
|
||||
httpdConf = mainCfg.configFile;
|
||||
|
||||
php = pkgs.php.override { apacheHttpd = httpd; };
|
||||
|
||||
|
@ -280,7 +282,7 @@ let
|
|||
'';
|
||||
|
||||
|
||||
httpdConf = pkgs.writeText "httpd.conf" ''
|
||||
confFile = pkgs.writeText "httpd.conf" ''
|
||||
|
||||
ServerRoot ${httpd}
|
||||
|
||||
|
@ -403,10 +405,29 @@ in
|
|||
";
|
||||
};
|
||||
|
||||
apacheHttpd = mkOption {
|
||||
default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; };
|
||||
example = "pkgs.apacheHttpd_2_4";
|
||||
description = "
|
||||
Overridable attribute of the Apache HTTP Server package to use.
|
||||
";
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
default = confFile;
|
||||
example = ''pkgs.writeText "httpd.conf" "# my custom config file ...";'';
|
||||
description = "
|
||||
Overridable config file to use for Apache. By default, use the
|
||||
file automatically generated by nixos.
|
||||
";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
These configuration lines will be passed verbatim to the apache config
|
||||
These configuration lines will be appended to the Apache config
|
||||
file. Note that this mechanism may not work when <option>configFile</option>
|
||||
is overridden.
|
||||
";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue