ikkuranus

vaultwarden swag config

Dec 26th, 2022
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. ## Version 2021/05/18
  2. # make sure that your dns has a cname set for bitwarden and that your bitwarden container is not using a base url
  3. # make sure your bitwarden container is named "bitwarden"
  4. # set the environment variable WEBSOCKET_ENABLED=true on your bitwarden container
  5.  
  6. server {
  7. listen 443 ssl;
  8. listen [::]:443 ssl;
  9.  
  10. server_name fartkey.*;
  11.  
  12. include /config/nginx/ssl.conf;
  13.  
  14. client_max_body_size 128M;
  15.  
  16. # enable for ldap auth, fill in ldap details in ldap.conf
  17. #include /config/nginx/ldap.conf;
  18.  
  19. # enable for Authelia
  20. include /config/nginx/authelia-server.conf;
  21.  
  22. location / {
  23. # enable the next two lines for http auth
  24. #auth_basic "Restricted";
  25. #auth_basic_user_file /config/nginx/.htpasswd;
  26.  
  27. # enable the next two lines for ldap auth
  28. #auth_request /auth;
  29. #error_page 401 =200 /ldaplogin;
  30.  
  31. # enable for Authelia
  32. #include /config/nginx/authelia-location.conf;
  33.  
  34. include /config/nginx/proxy.conf;
  35. include /config/nginx/resolver.conf;
  36. #proxy_set_header Accept-Encoding "";
  37. sub_filter
  38. '</head>'
  39. '<link rel="stylesheet" type="text/css" href="https://theme-park.dev/css/base/bitwarden/bitwarden-base.css">
  40. <link rel="stylesheet" type="text/css" href="https://theme-park.dev/css/theme-options/plex.css">
  41. </head>';
  42. sub_filter_once on;
  43. set $upstream_app vaultwarden;
  44. set $upstream_port 80;
  45. set $upstream_proto http;
  46. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  47.  
  48. }
  49.  
  50. location /admin {
  51. # enable the next two lines for http auth
  52. #auth_basic "Restricted";
  53. #auth_basic_user_file /config/nginx/.htpasswd;
  54.  
  55. # enable the next two lines for ldap auth
  56. #auth_request /auth;
  57. #error_page 401 =200 /ldaplogin;
  58.  
  59. # enable for Authelia
  60. include /config/nginx/authelia-location.conf;
  61.  
  62. include /config/nginx/proxy.conf;
  63. include /config/nginx/resolver.conf;
  64. proxy_set_header Accept-Encoding "";
  65. sub_filter
  66. '</head>'
  67. '<link rel="stylesheet" type="text/css" href="https://theme-park.dev/css/base/bitwarden/bitwarden-base.css">
  68. <link rel="stylesheet" type="text/css" href="https://theme-park.dev/css/theme-options/plex.css">
  69. </head>';
  70. sub_filter_once on;
  71.  
  72. set $upstream_app vaultwarden;
  73. set $upstream_port 80;
  74. set $upstream_proto http;
  75. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  76.  
  77. }
  78.  
  79. location /notifications/hub {
  80. include /config/nginx/proxy.conf;
  81. include /config/nginx/resolver.conf;
  82. set $upstream_app vaultwarden;
  83. set $upstream_port 3012;
  84. set $upstream_proto http;
  85. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  86.  
  87. }
  88.  
  89. location /notifications/hub/negotiate {
  90. include /config/nginx/proxy.conf;
  91. include /config/nginx/resolver.conf;
  92. set $upstream_app vaultwarden;
  93. set $upstream_port 80;
  94. set $upstream_proto http;
  95. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  96.  
  97. }
  98. }
  99.  
Advertisement
Add Comment
Please, Sign In to add comment