From 336a6f471f1e40d4a440b4176c2a1b8db65fe007 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 8 Jan 2020 10:37:46 -0500 Subject: [PATCH] nixos/httpd: symlink apache configuration to /etc/httpd/httpd.conf for use in the apachectl command --- nixos/modules/services/web-servers/apache-httpd/default.nix | 3 +++ pkgs/servers/http/apache-httpd/2.4.nix | 1 + 2 files changed, 4 insertions(+) diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 4460f89ec5c1..fd17e4b54f0f 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -629,6 +629,9 @@ in environment.systemPackages = [httpd]; + # required for "apachectl configtest" + environment.etc."httpd/httpd.conf".source = httpdConf; + services.httpd.phpOptions = '' ; Needed for PHP's mail() function. diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index d5da6df8d689..252365098ddc 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -39,6 +39,7 @@ stdenv.mkDerivation rec { prePatch = '' sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|" sed -i support/apachectl.in -e 's|@LYNX_PATH@|${lynx}/bin/lynx|' + sed -i support/apachectl.in -e 's|$HTTPD -t|$HTTPD -t -f /etc/httpd/httpd.conf|' ''; # Required for ‘pthread_cancel’.