diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-06 14:27:02 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-06 14:55:44 +0100 |
commit | b3eb981a956336ca96a36faaa7c725f4bda7ca78 (patch) | |
tree | ab9b4bbe0aa76c3c1e507de4a2bd68dec87ecd14 /nixos | |
parent | 85d23f52928be37039d2d5a9cf735f5f46092ba4 (diff) | |
download | nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar.gz nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar.bz2 nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar.lz nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar.xz nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.tar.zst nixlib-b3eb981a956336ca96a36faaa7c725f4bda7ca78.zip |
apache-httpd: Make 2.4 the default
The NixOS 14.11 release is a good time to finally make 2.4 the default.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1411.xml | 13 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/default.nix | 9 | ||||
-rw-r--r-- | nixos/tests/proxy.nix | 7 |
3 files changed, 21 insertions, 8 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1411.xml b/nixos/doc/manual/release-notes/rl-1411.xml index 74cf8323e692..e355118139dc 100644 --- a/nixos/doc/manual/release-notes/rl-1411.xml +++ b/nixos/doc/manual/release-notes/rl-1411.xml @@ -11,6 +11,19 @@ following incompatible changes: <itemizedlist> + <listitem><para>The default version of Apache httpd is now 2.4. If + you use the <option>extraConfig</option> option to pass literal + Apache configuration text, you may need to update it — see <link + xlink:href="http://httpd.apache.org/docs/2.4/upgrading.html">Apache’s + documentation</link> for details. If you wish to continue to use + httpd 2.2, add the following line to your NixOS configuration: + +<programlisting> +services.httpd.package = pkgs.apacheHttpd_2_2; +</programlisting> + + </para></listitem> + <listitem><para>The host side of a container virtual Ethernet pair is now called <literal>ve-<replaceable>container-name</replaceable></literal> rather than <literal>c-<replaceable>container-name</replaceable></literal>.</para></listitem> diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 85458a2ab565..71fb58c3320f 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -109,6 +109,8 @@ let "mpm_${mainCfg.multiProcessingModule}" "authz_core" "unixd" + "cache" "cache_disk" + "slotmem_shm" ] ++ (if mainCfg.multiProcessingModule == "prefork" then [ "cgi" ] else [ "cgid" ]) ++ optional enableSSL "ssl" @@ -420,8 +422,7 @@ in package = mkOption { type = types.package; - default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; }; - example = literalExample "pkgs.apacheHttpd_2_4"; + default = pkgs.apacheHttpd; description = '' Overridable attribute of the Apache HTTP Server package to use. ''; @@ -593,11 +594,11 @@ in ###### implementation config = mkIf config.services.httpd.enable { - + assertions = [ { assertion = mainCfg.enableSSL == true -> mainCfg.sslServerCert != null && mainCfg.sslServerKey != null; - message = "SSL is enabled for HTTPD, but sslServerCert and/or sslServerKey haven't been specified."; } + message = "SSL is enabled for httpd, but sslServerCert and/or sslServerKey haven't been specified."; } ]; users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") (singleton diff --git a/nixos/tests/proxy.nix b/nixos/tests/proxy.nix index 01f0f3fe17a3..8350bc5c6a4b 100644 --- a/nixos/tests/proxy.nix +++ b/nixos/tests/proxy.nix @@ -22,20 +22,19 @@ in { services.httpd.enable = true; services.httpd.adminAddr = "bar@example.org"; - services.httpd.extraModules = ["proxy_balancer"]; + services.httpd.extraModules = [ "proxy_balancer" "lbmethod_byrequests" ]; services.httpd.extraConfig = '' ExtendedStatus on <Location /server-status> - Order deny,allow - Allow from all + Require all granted SetHandler server-status </Location> <Proxy balancer://cluster> - Allow from all + Require all granted BalancerMember http://${nodes.backend1.config.networking.hostName} retry=0 BalancerMember http://${nodes.backend2.config.networking.hostName} retry=0 </Proxy> |