From 94346f25829ba066e571dc951a6621e001d518d8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 24 Jan 2016 12:26:20 +0100 Subject: better nginx conf --- custom/simp_le.nix | 2 +- custom/ymir-nginx.nix | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/custom/simp_le.nix b/custom/simp_le.nix index 4082612e..2143dfad 100644 --- a/custom/simp_le.nix +++ b/custom/simp_le.nix @@ -7,7 +7,7 @@ dir: domain: let - script = writeText "cert.sh" '' + script = writeText "${domain}.sh" '' mkdir -p ${dir} cd ${dir} ${simp_le}/bin/simp_le -d ${domain}:/srv/www/acme/${domain}/ \ diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 3664ad7d..ac64cac7 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -116,21 +116,13 @@ in { } server { - http { - listen *:80; - listen *:443 ssl; - listen [::]:80; - listen [::]:443 ssl; - ssl_certificate /etc/nginx/ssl/git.yggdrasil.li/fullchain.pem; - ssl_certificate_key /etc/nginx/ssl/git.yggdrasil.li/privkey.pem; - server_name git.yggdrasil.li; - } - - http { - listen *:80; - listen [::]:80; - server_name www.git.yggdrasil.li; - } + listen *:80; + listen *:443 ssl; + listen [::]:80; + listen [::]:443 ssl; + ssl_certificate /etc/nginx/ssl/git.yggdrasil.li/fullchain.pem; + ssl_certificate_key /etc/nginx/ssl/git.yggdrasil.li/privkey.pem; + server_name git.yggdrasil.li; root ${pkgs.cgit}/cgit; -- cgit v1.2.3