From 5d2dbdfdec06afd5899792167934cf1b69bc9ae1 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 7 Feb 2021 16:17:57 +0100 Subject: Add ssl --- machines/srv1/configuration.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/machines/srv1/configuration.nix b/machines/srv1/configuration.nix index 4505cb2..409001b 100644 --- a/machines/srv1/configuration.nix +++ b/machines/srv1/configuration.nix @@ -64,18 +64,23 @@ in services.nginx.virtualHosts."srv1.niedzwiedzinski.cyou" = { addSSL = true; enableACME = true; + forceSSL = true; root = "/var/www/srv1.niedzwiedzinski.cyou"; }; services.nginx.virtualHosts."git.niedzwiedzinski.cyou" = { locations."/".proxyPass = "http://localhost:8080/cgit/"; locations."/cgit/".proxyPass = "http://localhost:8080"; + addSSL = true; + enableACME = true; + forceSSL = true; }; security.acme.certs = { "srv1.niedzwiedzinski.cyou".email = "pniedzwiedzinski19@gmail.com"; + "git.niedzwiedzinski.cyou".email = "pniedzwiedzinski19@gmail.com"; }; security.acme.acceptTerms = true; - networking.firewall.allowedTCPPorts = [ 80 8080 443 ]; + networking.firewall.allowedTCPPorts = [ 80 443 ]; # networking.firewall.allowedUDPPorts = [ ... ]; services.molly-brown = { -- cgit 1.4.1