summaryrefslogtreecommitdiff
path: root/hosts/cloud/sortug/nginx.nix
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2024-09-12 03:13:47 +0700
committerpolwex <polwex@sortug.com>2024-09-12 03:13:47 +0700
commite179300899ea74865cd35fb38f7d589dcd269ecb (patch)
treed4ed77eb5c992b764d3c1bff62dbcaa5d28b4bd6 /hosts/cloud/sortug/nginx.nix
parent71875f0b723fb51ec59a18ee612d385702fb8765 (diff)
m
Diffstat (limited to 'hosts/cloud/sortug/nginx.nix')
-rw-r--r--hosts/cloud/sortug/nginx.nix47
1 files changed, 27 insertions, 20 deletions
diff --git a/hosts/cloud/sortug/nginx.nix b/hosts/cloud/sortug/nginx.nix
index a3e5a85..655b44c 100644
--- a/hosts/cloud/sortug/nginx.nix
+++ b/hosts/cloud/sortug/nginx.nix
@@ -1,22 +1,21 @@
-{ ... }: {
-
+{...}: {
security.acme.acceptTerms = true;
security.acme.defaults.email = "security@sortug.com";
services.nginx = {
enable = true;
- virtualHosts."sortug.com" = {
+ virtualHosts."sortug.com" = {
enableACME = true;
forceSSL = true;
root = "/var/www/sortug";
# root = "/home/y/www";
};
- virtualHosts."cal.sortug.com" = {
+ virtualHosts."cal.sortug.com" = {
enableACME = true;
forceSSL = true;
root = "/var/www/sorcal";
# root = "/home/y/www";
};
- virtualHosts."git.sortug.com" = {
+ virtualHosts."git.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
@@ -24,7 +23,15 @@
proxyWebsockets = true; # needed if you need to use WebSocket
};
};
- virtualHosts."u.sortug.com" = {
+ virtualHosts."ai.sortug.com" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8000";
+ proxyWebsockets = true; # needed if you need to use WebSocket
+ };
+ };
+ virtualHosts."u.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
@@ -32,7 +39,7 @@
proxyWebsockets = true; # needed if you need to use WebSocket
};
};
- virtualHosts."p.sortug.com" = {
+ virtualHosts."p.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
@@ -47,10 +54,10 @@
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
- proxy_cache off;
+ proxy_cache off;
'';
};
- virtualHosts."ntfy.sortug.com" = {
+ virtualHosts."ntfy.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
@@ -65,10 +72,10 @@
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
- proxy_cache off;
+ proxy_cache off;
'';
};
- virtualHosts."ustj.sortug.com" = {
+ virtualHosts."ustj.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
@@ -83,36 +90,36 @@
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
- proxy_cache off;
+ proxy_cache off;
'';
};
- virtualHosts."s3.sortug.com" = {
+ virtualHosts."s3.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:9000";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = ''
- proxy_set_header Host $Host;
+ proxy_set_header Host $Host;
'';
# actually important
};
};
- virtualHosts."s3c.sortug.com" = {
+ virtualHosts."s3c.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:9001";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = ''
- proxy_set_header Host $Host;
+ proxy_set_header Host $Host;
'';
};
};
- # proxy_http_version 1.1;
- # proxy_set_header Upgrade $http_upgrade;
- # proxy_set_header Connection "Upgrade";
- virtualHosts."urbit.s3.sortug.com" = {
+ # proxy_http_version 1.1;
+ # proxy_set_header Upgrade $http_upgrade;
+ # proxy_set_header Connection "Upgrade";
+ virtualHosts."urbit.s3.sortug.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {