diff options
author | Ben Sima <ben@bsima.me> | 2020-11-16 11:47:36 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-11-16 11:47:36 -0500 |
commit | 656816ed9af6277bbeb1c5e74471bace3a78e5be (patch) | |
tree | 8d9b28d4a804fdb258f17b32e675bf9a4dcf8a98 /Biz/Cloud/Web.nix | |
parent | eb3ee6f1867eb19d2a262826038b2615b3def762 (diff) |
get build working and capitalize more files
Diffstat (limited to 'Biz/Cloud/Web.nix')
-rw-r--r-- | Biz/Cloud/Web.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix new file mode 100644 index 0000000..acd5c2f --- /dev/null +++ b/Biz/Cloud/Web.nix @@ -0,0 +1,41 @@ +{ ... }: + +let + bensIp = "24.140.84.23"; +in +{ + services = { + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "bsima.me".root = "/home/ben/public_html/"; + "www.bsima.me".root = "/home/ben/public_html/"; + "simatime.com".locations."/".root = "/srv/www/"; + "firefoxsync.simatime.com".locations."/".proxyPass = "http://localhost:5001"; + "hero.simatime.com".locations."/".proxyPass = "http://${bensIp}:3001"; + "tv.simatime.com".locations."/".proxyPass = "http://${bensIp}:8096"; # emby runs on port 8096 + "deluge.simatime.com".locations."/".proxyPass = "http://${bensIp}:8112"; + + "notebook.simatime.com".locations = { + "/" = { + proxyPass = "http://${bensIp}:3099"; + proxyWebsockets = true; + extraConfig = '' + proxy_buffering off; + proxy_read_timeout 86400; + + ''; + }; + "/(api/kernels/[^/]+/channels|terminals/websocket)/" = { + proxyPass = "http://${bensIp}:3099"; + proxyWebsockets = true; + }; + }; + }; + }; + }; +} |