enable quic

This commit is contained in:
Kopatz
2023-12-08 18:47:26 +01:00
parent d755c10d0e
commit b8c4096236
3 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
systemd.tmpfiles.rules = [
"d /data 0770 github-actions-runner nginx -"
@@ -8,6 +10,7 @@
services.nginx = {
enable = true;
package = pkgs.nginxQuic;
# Use recommended settings
recommendedGzipSettings = true;
@@ -30,6 +33,8 @@
root = "/data/website";
forceSSL = true;
enableACME = true;
quic = true;
http3 = true;
locations."~* \\.(jpg)$".extraConfig= ''
add_header Access-Control-Allow-Origin *;
'';
@@ -43,19 +48,15 @@
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:5091;
'';
locations."/tracker-site" = {
tryFiles = "$uri $uri/ /tracker-site/index.html =404";
};
locations."/tracker-site" = {
tryFiles = "$uri $uri/ /tracker-site/index.html =404";
};
locations."/tracker-site/api" = {
extraConfig =''
rewrite /tracker-site/api/(.*) /$1 break;
'';
proxyPass = "http://127.0.0.1:8080";
};
#locations."~/books(.*)$" = {
# proxyPass = "http://127.0.0.1:5000";
#};
};
#discord bot for tracking useractivity public version
"activitytracker.site" = {
@@ -65,6 +66,8 @@
root = "/data/website/tracker-site-public";
forceSSL = true;
enableACME = true;
quic = true;
http3 = true;
locations."/" = {
tryFiles = "$uri $uri/ /index.html =404";
};