mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-22 09:49:20 -07:00
Updated some haproxy example to v1.29.0
@@ -107,7 +107,7 @@ You'll have to set `IP_HEADER` to `X-Forwarded-For` instead of `X-Real-IP` in th
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Nginx - v1.29.0 (by BlackDex)</summary><br/>
|
<summary>Nginx - v1.29.0+ (by BlackDex)</summary><br/>
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
# The `upstream` directives ensure that you have a http/1.1 connection
|
# The `upstream` directives ensure that you have a http/1.1 connection
|
||||||
@@ -202,7 +202,7 @@ If you run into 504 Gateway Timeout problems, tell nginx to wait longer for vaul
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Nginx with sub-path - v1.29.0 (by BlackDex)</summary><br/>
|
<summary>Nginx with sub-path - v1.29.0+ (by BlackDex)</summary><br/>
|
||||||
|
|
||||||
In this example vaultwarden will be available via https://bitwarden.example.tld/vault/<br/>
|
In this example vaultwarden will be available via https://bitwarden.example.tld/vault/<br/>
|
||||||
If you want to use any other sub-path, like `bitwarden` or `secret-vault` you should change `/vault/` in the example below to match.<br/>
|
If you want to use any other sub-path, like `bitwarden` or `secret-vault` you should change `/vault/` in the example below to match.<br/>
|
||||||
@@ -691,7 +691,7 @@ labels:
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>HAproxy (by BlackDex)</summary><br/>
|
<summary>HAproxy - v1.29.0+ (by BlackDex)</summary><br/>
|
||||||
|
|
||||||
Add these lines to your haproxy configuration.
|
Add these lines to your haproxy configuration.
|
||||||
|
|
||||||
@@ -701,22 +701,18 @@ frontend vaultwarden
|
|||||||
option forwardfor header X-Real-IP
|
option forwardfor header X-Real-IP
|
||||||
http-request set-header X-Real-IP %[src]
|
http-request set-header X-Real-IP %[src]
|
||||||
default_backend vaultwarden_http
|
default_backend vaultwarden_http
|
||||||
use_backend vaultwarden_ws if { path_beg /notifications/hub } !{ path_beg /notifications/hub/negotiate }
|
|
||||||
|
|
||||||
backend vaultwarden_http
|
backend vaultwarden_http
|
||||||
# Enable compression if you want
|
# Enable compression if you want
|
||||||
# compression algo gzip
|
# compression algo gzip
|
||||||
# compression type text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
|
# compression type text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
|
||||||
server vwhttp 0.0.0.0:8080
|
server vwhttp 0.0.0.0:8080 alpn http/1.1
|
||||||
|
|
||||||
backend vaultwarden_ws
|
|
||||||
server vwws 0.0.0.0:3012
|
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>HAproxy (by <a href="https://github.com/williamdes" target="_blank">@williamdes</a>)</summary><br/>
|
<summary>HAproxy - v1.29.0+ (by <a href="https://github.com/williamdes" target="_blank">@williamdes</a>)</summary><br/>
|
||||||
|
|
||||||
Add these lines to your HAproxy configuration.
|
Add these lines to your HAproxy configuration.
|
||||||
|
|
||||||
@@ -727,8 +723,7 @@ backend static-success-default
|
|||||||
errorfile 200 /usr/local/etc/haproxy/static/index.static.default.html
|
errorfile 200 /usr/local/etc/haproxy/static/index.static.default.html
|
||||||
|
|
||||||
frontend http-in
|
frontend http-in
|
||||||
bind *:80
|
bind *:443 ssl crt /acme.sh/domain.tld/domain.tld.pem alpn h2,http/1.1
|
||||||
bind *:443 ssl crt /acme.sh/domain.tld/domain.tld.pem
|
|
||||||
option forwardfor header X-Real-IP
|
option forwardfor header X-Real-IP
|
||||||
http-request set-header X-Real-IP %[src]
|
http-request set-header X-Real-IP %[src]
|
||||||
default_backend static-success-default
|
default_backend static-success-default
|
||||||
@@ -737,19 +732,14 @@ frontend http-in
|
|||||||
acl host_bitwarden_domain_tld hdr(Host) -i bitwarden.domain.tld
|
acl host_bitwarden_domain_tld hdr(Host) -i bitwarden.domain.tld
|
||||||
|
|
||||||
## figure out which one to use
|
## figure out which one to use
|
||||||
use_backend vaultwarden_http if host_bitwarden_domain_tld !{ path_beg /notifications/hub } or { path_beg /notifications/hub/negotiate }
|
use_backend vaultwarden_http if host_bitwarden_domain_tld
|
||||||
use_backend vaultwarden_ws if host_bitwarden_domain_tld { path_beg /notifications/hub } !{ path_beg /notifications/hub/negotiate }
|
|
||||||
|
|
||||||
backend vaultwarden_http
|
backend vaultwarden_http
|
||||||
# Enable compression if you want
|
# Enable compression if you want
|
||||||
# compression algo gzip
|
# compression algo gzip
|
||||||
# compression type text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
|
# compression type text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript
|
||||||
# You can use the container hostname if you are using haproxy with docker-compose
|
# You can use the container hostname if you are using haproxy with docker-compose
|
||||||
server vw_http 0.0.0.0:8080
|
server vw_http 0.0.0.0:8080 alpn http/1.1
|
||||||
|
|
||||||
backend vaultwarden_ws
|
|
||||||
# You can use the container hostname if you are using haproxy with docker-compose
|
|
||||||
server vw_ws 0.0.0.0:3012
|
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user