X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fapache%2Fhttpd_inte.nix;fp=nixops%2Fmodules%2Fwebsites%2Fapache%2Fhttpd_inte.nix;h=5046a2827081361e18c15dd8c56502291b4ab5d9;hb=9129f327844ca58af61a20582b04e35762c63e35;hp=ee7d15e8102423b6fa87e9c824bacc1463f4191d;hpb=d7d031b69f7dfa958d38e96e5ace4b2db023dade;p=perso%2FImmae%2FConfig%2FNix.git
diff --git a/nixops/modules/websites/apache/httpd_inte.nix b/nixops/modules/websites/apache/httpd_inte.nix
index ee7d15e..5046a28 100644
--- a/nixops/modules/websites/apache/httpd_inte.nix
+++ b/nixops/modules/websites/apache/httpd_inte.nix
@@ -151,7 +151,7 @@ let
loggingConf = (if mainCfg.logFormat != "none" then ''
- ErrorLog ${mainCfg.logDir}/error_log
+ ErrorLog ${mainCfg.logDir}/error.log
LogLevel notice
@@ -160,7 +160,7 @@ let
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
- CustomLog ${mainCfg.logDir}/access_log ${mainCfg.logFormat}
+ CustomLog ${mainCfg.logDir}/access.log ${mainCfg.logFormat}
'' else ''
ErrorLog /dev/null
'');
@@ -261,8 +261,8 @@ let
'' else ""}
${if !isMainServer && mainCfg.logPerVirtualHost then ''
- ErrorLog ${mainCfg.logDir}/error_log-${cfg.hostName}
- CustomLog ${mainCfg.logDir}/access_log-${cfg.hostName} ${cfg.logFormat}
+ ErrorLog ${mainCfg.logDir}/error-${cfg.hostName}.log
+ CustomLog ${mainCfg.logDir}/access-${cfg.hostName}.log ${cfg.logFormat}
'' else ""}
${optionalString (robotsTxt != "") ''
@@ -419,6 +419,7 @@ let
phpIni = pkgs.runCommand "php.ini"
{ options = concatStringsSep "\n"
([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
+ preferLocalBuild = true;
}
''
cat ${php}/etc/php.ini > $out
@@ -490,8 +491,8 @@ in
default = false;
description = ''
If enabled, each virtual host gets its own
- access_log and
- error_log, namely suffixed by the
+ access.log and
+ error.log, namely suffixed by the
of the virtual host.
'';
};
@@ -534,7 +535,7 @@ in
virtualHosts = mkOption {
type = types.listOf (types.submodule (
- { options = import ./per-server-options.nix {
+ { options = import {
inherit lib;
forMainServer = false;
};
@@ -667,6 +668,9 @@ in
''
; Needed for PHP's mail() function.
sendmail_path = sendmail -t -i
+
+ ; Don't advertise PHP
+ expose_php = off
'' + optionalString (!isNull config.time.timeZone) ''
; Apparently PHP doesn't use $TZ.
@@ -682,10 +686,7 @@ in
path =
[ httpd pkgs.coreutils pkgs.gnugrep ]
- ++ # Needed for PHP's mail() function. !!! Probably the
- # ssmtp module should export the path to sendmail in
- # some way.
- optional config.networking.defaultMailServer.directDelivery pkgs.ssmtp
+ ++ optional enablePHP pkgs.system-sendmail # Needed for PHP's mail() function.
++ concatMap (svc: svc.extraServerPath) allSubservices;
environment =