Merge pull request #45810 from vincentbernat/fix/nginx-stapling
nixos/nginx: ensure TLS OCSP stapling works out of the box with LE
This commit is contained in:
commit
1cc916b5b2
@ -16,9 +16,11 @@ let
|
|||||||
} // (optionalAttrs vhostConfig.enableACME {
|
} // (optionalAttrs vhostConfig.enableACME {
|
||||||
sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem";
|
sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem";
|
||||||
sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem";
|
sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem";
|
||||||
|
sslTrustedCertificate = "${acmeDirectory}/${serverName}/full.pem";
|
||||||
}) // (optionalAttrs (vhostConfig.useACMEHost != null) {
|
}) // (optionalAttrs (vhostConfig.useACMEHost != null) {
|
||||||
sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem";
|
sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem";
|
||||||
sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem";
|
sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem";
|
||||||
|
sslTrustedCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/full.pem";
|
||||||
})
|
})
|
||||||
) cfg.virtualHosts;
|
) cfg.virtualHosts;
|
||||||
enableIPv6 = config.networking.enableIPv6;
|
enableIPv6 = config.networking.enableIPv6;
|
||||||
@ -228,6 +230,9 @@ let
|
|||||||
ssl_certificate ${vhost.sslCertificate};
|
ssl_certificate ${vhost.sslCertificate};
|
||||||
ssl_certificate_key ${vhost.sslCertificateKey};
|
ssl_certificate_key ${vhost.sslCertificateKey};
|
||||||
''}
|
''}
|
||||||
|
${optionalString (hasSSL && vhost.sslTrustedCertificate != null) ''
|
||||||
|
ssl_trusted_certificate ${vhost.sslTrustedCertificate};
|
||||||
|
''}
|
||||||
|
|
||||||
${optionalString (vhost.basicAuthFile != null || vhost.basicAuth != {}) ''
|
${optionalString (vhost.basicAuthFile != null || vhost.basicAuth != {}) ''
|
||||||
auth_basic secured;
|
auth_basic secured;
|
||||||
|
@ -129,6 +129,13 @@ with lib;
|
|||||||
description = "Path to server SSL certificate key.";
|
description = "Path to server SSL certificate key.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sslTrustedCertificate = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = null;
|
||||||
|
example = "/var/root.cert";
|
||||||
|
description = "Path to root SSL certificate for stapling and client certificates.";
|
||||||
|
};
|
||||||
|
|
||||||
http2 = mkOption {
|
http2 = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user