diff options
author | lassulus <lassulus@lassul.us> | 2022-12-02 09:05:42 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-12-02 09:06:32 +0100 |
commit | 645c3564f75589531abcf17fd3c3f920d93a394a (patch) | |
tree | 27a35462d208c0eda46017eb1f81a677309a166e /krebs/2configs/mastodon-proxy.nix | |
parent | 2ea3b14cb5caa06f2d2972177a93cddb6d9d66f6 (diff) |
init social.krebsco.de
Diffstat (limited to 'krebs/2configs/mastodon-proxy.nix')
-rw-r--r-- | krebs/2configs/mastodon-proxy.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/krebs/2configs/mastodon-proxy.nix b/krebs/2configs/mastodon-proxy.nix new file mode 100644 index 000000000..4d359c3fe --- /dev/null +++ b/krebs/2configs/mastodon-proxy.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: +{ + services.nginx = { + enable = true; + virtualHosts."social.krebsco.de" = { + forceSSL = true; + enableACME = true; + locations."/" = { + # TODO use this in 22.11 + # recommendedProxySettings = true; + proxyPass = "http://hotdog.r"; + proxyWebsockets = true; + 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; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + ''; + }; + }; + }; +} |