From f0a30f5efac8d9611bb8c4a8b9fb04a29c709a2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobi=20=C2=BBA=3A=20Litschi=C2=AB?=
<51724453+tklitschi@users.noreply.github.com>
Date: Tue, 30 Jun 2020 03:36:03 +0200
Subject: [PATCH] Updated Proxy examples (markdown)
---
Proxy-examples.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/Proxy-examples.md b/Proxy-examples.md
index 14cac25..58b5dbf 100644
--- a/Proxy-examples.md
+++ b/Proxy-examples.md
@@ -227,6 +227,57 @@ nginx__servers:
```
+
+Nginx (NixOS)(by tklitschi)
+
+Example NixSO nginx config. For more Information about NixOS Deployement see [depluyement Wiki page](https://github.com/dani-garcia/bitwarden_rs/wiki/Deployment-examples).
+
+
+```nix
+{ config, ... }:
+{
+ security.acme.acceptTerms = true;
+ security.acme.email = "me@example.com";
+ security.acme.certs = {
+
+ "bw.example.com" = {
+ group = "bitwarden_rs";
+ keyType = "rsa2048";
+ allowKeysForGroup = true;
+ };
+ };
+
+ services.nginx = {
+ enable = true;
+
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+ recommendedTlsSettings = true;
+
+ virtualHosts = {
+ "bw.example.com" = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/" = {
+ proxyPass = "http://localhost:8812"; #changed the default rocket port due to some conflict
+ proxyWebsockets = true;
+ };
+ locations."/notifications/hub" = {
+ proxyPass = "http://localhost:3012";
+ proxyWebsockets = true;
+ };
+ locations."/notifications/hub/negotiate" = {
+ proxyPass = "http://localhost:8812";
+ proxyWebsockets = true;
+ };
+ };
+ };
+ };
+}
+
+```
+
Apache (by fbartels)