Merge pull request #89 from fsr/http3

nginx: enable http3
This commit is contained in:
Rouven Seifert 2024-04-04 14:09:14 +02:00 committed by GitHub
commit 913f410813
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,10 +7,14 @@
({ name, ... }: { ({ name, ... }: {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
# enable http3 for all hosts
quic = true;
http3 = true;
# split up nginx access logs per vhost # split up nginx access logs per vhost
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/${name}_access.log; access_log /var/log/nginx/${name}_access.log;
error_log /var/log/nginx/${name}_error.log; error_log /var/log/nginx/${name}_error.log;
add_header Alt-Svc 'h3=":443"; ma=86400';
''; '';
}) })
); );
@ -18,10 +22,12 @@
}; };
config = { config = {
networking.firewall.allowedTCPPorts = [ 443 80 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
services.nginx = { services.nginx = {
additionalModules = [ pkgs.nginxModules.pam ];
enable = true; enable = true;
package = pkgs.nginxQuic;
additionalModules = [ pkgs.nginxModules.pam ];
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;