diff --git a/modules/server/nginx.nix b/modules/server/nginx.nix index 9dc13c4..2603b24 100644 --- a/modules/server/nginx.nix +++ b/modules/server/nginx.nix @@ -27,6 +27,28 @@ } ]; }; + "zeroq.local" = { + forceSSL = false; + enableACME = false; + root = pkgs.writeTextDir "index.html" '' + + + +
This server is running in backend.
+ + + ''; + listen = [ + { + addr = "100.64.0.0"; + port = 80; + } + { + addr = "192.168.1.20"; + port = 80; + } + ]; + }; # "localhost:8000" = { # forceSSL = false; # enableACME = false; diff --git a/modules/vds/nginx.nix b/modules/vds/nginx.nix index 1f0ad02..b37acc2 100644 --- a/modules/vds/nginx.nix +++ b/modules/vds/nginx.nix @@ -55,16 +55,36 @@ in # client_max_body_size 5G; # ''; # }; - # "zeroq.ru" = { - # forceSSL = true; - # enableACME = true; - # locations."/.well-known/discord" = { - # extraConfig = '' - # default_type text/plain; - # return 200 "dh=c2d103553a4cfdaa1b7952a87a7d8120a1e167cc"; - # ''; - # }; - # }; + "zeroq.ru" = { + forceSSL = true; + enableACME = true; + root = pkgs.writeTextDir "index.html" '' + + + +
This server is running.
+ + + ''; + locations = { + "/".tryFiles = "$uri =404"; + "/guest/" = { + proxyPass = "http://${server}:80"; + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + ''; + }; + # "/.well-known/discord" = { + # extraConfig = '' + # default_type text/plain; + # return 200 "dh=c2d103553a4cfdaa1b7952a87a7d8120a1e167cc"; + # ''; + # }; + }; + }; "flux.zeroq.ru" = { forceSSL = true; enableACME = true;