mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
apache-httpd: Create runtime dir for version 2.4.
By default the path is determined related to ServerRoot. Unfortunately ServerRoot is pointing to the Nix store and the web server can't write to it. We now create a directory called "runtime" withen the stateDir and point DefaultRuntimeDir to it. For more information on the DefaultRuntimeDir directive, please see: http://httpd.apache.org/docs/2.4/mod/core.html#defaultruntimedir Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
5655ec0efa
commit
919e6e55a9
@ -303,6 +303,10 @@ let
|
||||
|
||||
ServerRoot ${httpd}
|
||||
|
||||
${optionalString (!versionOlder httpd.version "2.4") ''
|
||||
DefaultRuntimeDir ${mainCfg.stateDir}/runtime
|
||||
''}
|
||||
|
||||
PidFile ${mainCfg.stateDir}/httpd.pid
|
||||
|
||||
${optionalString (mainCfg.multiProcessingModule != "prefork") ''
|
||||
@ -636,6 +640,10 @@ in
|
||||
''
|
||||
mkdir -m 0750 -p ${mainCfg.stateDir}
|
||||
chown root.${mainCfg.group} ${mainCfg.stateDir}
|
||||
${optionalString (!versionOlder httpd.version "2.4") ''
|
||||
mkdir -m 0750 -p "${mainCfg.stateDir}/runtime"
|
||||
chown root.${mainCfg.group} "${mainCfg.stateDir}/runtime"
|
||||
''}
|
||||
mkdir -m 0700 -p ${mainCfg.logDir}
|
||||
|
||||
${optionalString (mainCfg.documentRoot != null)
|
||||
|
Loading…
Reference in New Issue
Block a user