aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/apache/httpd_prod.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/modules/websites/apache/httpd_prod.nix')
-rw-r--r--nixops/modules/websites/apache/httpd_prod.nix23
1 files changed, 12 insertions, 11 deletions
diff --git a/nixops/modules/websites/apache/httpd_prod.nix b/nixops/modules/websites/apache/httpd_prod.nix
index 31904e0..4b646f5 100644
--- a/nixops/modules/websites/apache/httpd_prod.nix
+++ b/nixops/modules/websites/apache/httpd_prod.nix
@@ -151,7 +151,7 @@ let
151 151
152 152
153 loggingConf = (if mainCfg.logFormat != "none" then '' 153 loggingConf = (if mainCfg.logFormat != "none" then ''
154 ErrorLog ${mainCfg.logDir}/error_log 154 ErrorLog ${mainCfg.logDir}/error.log
155 155
156 LogLevel notice 156 LogLevel notice
157 157
@@ -160,7 +160,7 @@ let
160 LogFormat "%{Referer}i -> %U" referer 160 LogFormat "%{Referer}i -> %U" referer
161 LogFormat "%{User-agent}i" agent 161 LogFormat "%{User-agent}i" agent
162 162
163 CustomLog ${mainCfg.logDir}/access_log ${mainCfg.logFormat} 163 CustomLog ${mainCfg.logDir}/access.log ${mainCfg.logFormat}
164 '' else '' 164 '' else ''
165 ErrorLog /dev/null 165 ErrorLog /dev/null
166 ''); 166 '');
@@ -261,8 +261,8 @@ let
261 '' else ""} 261 '' else ""}
262 262
263 ${if !isMainServer && mainCfg.logPerVirtualHost then '' 263 ${if !isMainServer && mainCfg.logPerVirtualHost then ''
264 ErrorLog ${mainCfg.logDir}/error_log-${cfg.hostName} 264 ErrorLog ${mainCfg.logDir}/error-${cfg.hostName}.log
265 CustomLog ${mainCfg.logDir}/access_log-${cfg.hostName} ${cfg.logFormat} 265 CustomLog ${mainCfg.logDir}/access-${cfg.hostName}.log ${cfg.logFormat}
266 '' else ""} 266 '' else ""}
267 267
268 ${optionalString (robotsTxt != "") '' 268 ${optionalString (robotsTxt != "") ''
@@ -419,6 +419,7 @@ let
419 phpIni = pkgs.runCommand "php.ini" 419 phpIni = pkgs.runCommand "php.ini"
420 { options = concatStringsSep "\n" 420 { options = concatStringsSep "\n"
421 ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices)); 421 ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
422 preferLocalBuild = true;
422 } 423 }
423 '' 424 ''
424 cat ${php}/etc/php.ini > $out 425 cat ${php}/etc/php.ini > $out
@@ -490,8 +491,8 @@ in
490 default = false; 491 default = false;
491 description = '' 492 description = ''
492 If enabled, each virtual host gets its own 493 If enabled, each virtual host gets its own
493 <filename>access_log</filename> and 494 <filename>access.log</filename> and
494 <filename>error_log</filename>, namely suffixed by the 495 <filename>error.log</filename>, namely suffixed by the
495 <option>hostName</option> of the virtual host. 496 <option>hostName</option> of the virtual host.
496 ''; 497 '';
497 }; 498 };
@@ -534,7 +535,7 @@ in
534 535
535 virtualHosts = mkOption { 536 virtualHosts = mkOption {
536 type = types.listOf (types.submodule ( 537 type = types.listOf (types.submodule (
537 { options = import ./per-server-options.nix { 538 { options = import <nixpkgs/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix> {
538 inherit lib; 539 inherit lib;
539 forMainServer = false; 540 forMainServer = false;
540 }; 541 };
@@ -667,6 +668,9 @@ in
667 '' 668 ''
668 ; Needed for PHP's mail() function. 669 ; Needed for PHP's mail() function.
669 sendmail_path = sendmail -t -i 670 sendmail_path = sendmail -t -i
671
672 ; Don't advertise PHP
673 expose_php = off
670 '' + optionalString (!isNull config.time.timeZone) '' 674 '' + optionalString (!isNull config.time.timeZone) ''
671 675
672 ; Apparently PHP doesn't use $TZ. 676 ; Apparently PHP doesn't use $TZ.
@@ -682,10 +686,7 @@ in
682 686
683 path = 687 path =
684 [ httpd pkgs.coreutils pkgs.gnugrep ] 688 [ httpd pkgs.coreutils pkgs.gnugrep ]
685 ++ # Needed for PHP's mail() function. !!! Probably the 689 ++ optional enablePHP pkgs.system-sendmail # Needed for PHP's mail() function.
686 # ssmtp module should export the path to sendmail in
687 # some way.
688 optional config.networking.defaultMailServer.directDelivery pkgs.ssmtp
689 ++ concatMap (svc: svc.extraServerPath) allSubservices; 690 ++ concatMap (svc: svc.extraServerPath) allSubservices;
690 691
691 environment = 692 environment =