From 0aad4cffabf436494bedff9594e10f9a79b6a1dd Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 11 May 2021 11:48:26 +0200 Subject: [PATCH] Add Mono FastCGI configuration --- modules/webstack.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/webstack.nix b/modules/webstack.nix index f81f3f3..155cf2a 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -42,13 +42,41 @@ forceSSL = true; }; }; + virtualHosts = { + "frontend.coace.duckdns.org" = { + enableACME = true; + forceSSL = true; + root = "/vault/backups/frontend/inetpub/wwwroot"; + locations = { + "/few/".extraConfig = '' + fastcgi_index Default.aspx; + fastcgi_pass 127.0.0.1:9000; + fastcgi_param SCRIPT_FILENAME $document_root/few/$fastcgi_script_name; + fastcgi_param PATH_INFO ""; + fastcgi-mono-server4 /applications=/few/:/vault/backups/frontend/inetpub/wwwroot/socket=tcp:127.0.0.1:9000; + include ${pkgs.nginx}/conf/fastcgi_params; + ''; + "/gcw/".extraConfig = '' + fastcgi_index Default.aspx; + fastcgi_pass 127.0.0.1:9000; + fastcgi_param SCRIPT_FILENAME $document_root/few/$fastcgi_script_name; + fastcgi_param PATH_INFO ""; + fastcgi-mono-server4 /applications=/gcw/:/vault/backups/frontend/inetpub/wwwroot/socket=tcp:127.0.0.1:9000; + include ${pkgs.nginx}/conf/fastcgi_params; + ''; + }; + }; + }; }; # ACME certs configuration security.acme = { acceptTerms = true; email = "secretario@arquitectosdeceuta.com"; - certs."coace.duckdns.org".webroot = "/var/lib/acme/acme-challenge"; + certs."coace.duckdns.org" = { + webroot = "/var/lib/acme/acme-challenge"; + extraDomainNames = [ "frontend.coace.duckdns.org" ]; + }; }; # Generate dhparams