mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-24 02:39:21 -07:00
merge both apache with subpath examples (> 2.4.47) as both have been made more or less identical, also remove outdated information about proxy_wstunnel_module
@@ -468,7 +468,9 @@ server {
|
|||||||
<details>
|
<details>
|
||||||
<summary>Apache (by fbartels)</summary><br/>
|
<summary>Apache (by fbartels)</summary><br/>
|
||||||
|
|
||||||
Remember to enable `mod_proxy_wstunnel` and `mod_proxy_http`, for example with: `a2enmod proxy_wstunnel` and `a2enmod proxy_http`.
|
Remember to enable `mod_proxy_http`, for example with: `a2enmod proxy_http`.
|
||||||
|
This requires Apache >= 2.4.47
|
||||||
|
|
||||||
```apache
|
```apache
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
@@ -494,7 +496,8 @@ Remember to enable `mod_proxy_wstunnel` and `mod_proxy_http`, for example with:
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Apache in a sub-location (by <a href=https://github.com/agentdr8 target=_blank>@agentdr8</a>)</summary><br/>
|
<summary>Apache in a sub-location (by <a href=https://github.com/agentdr8 target=_blank>@agentdr8</a> and <a href="https://github.com/NoseyNick" target="_blank">@NoseyNick</a>)</summary><br/>
|
||||||
|
|
||||||
Modify your docker start-up to include the sub-location.
|
Modify your docker start-up to include the sub-location.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -502,19 +505,12 @@ Modify your docker start-up to include the sub-location.
|
|||||||
DOMAIN=https://shared.example.tld/vault/
|
DOMAIN=https://shared.example.tld/vault/
|
||||||
```
|
```
|
||||||
|
|
||||||
Ensure you have the websocket proxy module loaded somewhere in your apache config.
|
Remember to enable `mod_proxy_http`, for example with: `a2enmod proxy_http`. This requires Apache >= 2.4.47
|
||||||
It can look something like:
|
|
||||||
|
|
||||||
```
|
|
||||||
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so`
|
|
||||||
```
|
|
||||||
|
|
||||||
On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and `a2enmod proxy_http`.
|
|
||||||
|
|
||||||
```apache
|
```apache
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
ServerName $hostname.$domainname
|
ServerName shared.example.tld
|
||||||
|
|
||||||
SSLCertificateFile ${SSLCERTIFICATE}
|
SSLCertificateFile ${SSLCERTIFICATE}
|
||||||
SSLCertificateKeyFile ${SSLKEY}
|
SSLCertificateKeyFile ${SSLKEY}
|
||||||
@@ -526,34 +522,13 @@ On some OS's you can use a2enmod, for example with: `a2enmod proxy_wstunnel` and
|
|||||||
|
|
||||||
<Location /vault/> #adjust here if necessary
|
<Location /vault/> #adjust here if necessary
|
||||||
ProxyPass http://127.0.0.1:8000/vault/ upgrade=websocket
|
ProxyPass http://127.0.0.1:8000/vault/ upgrade=websocket
|
||||||
|
ProxyPreserveHost On
|
||||||
ProxyPreserveHost Off
|
|
||||||
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
||||||
</Location>
|
</Location>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Apache 2.4.47 (or later) in a sub-location (by <a href="https://github.com/NoseyNick" target="_blank">@NoseyNick</a>)</summary><br/>
|
|
||||||
|
|
||||||
The regular `mod_proxy` now supports upgrading to websockets, with `upgrade=websocket`, no need for `mod_proxy_wstunnel`.
|
|
||||||
|
|
||||||
Copy the instructions above, except use the much simpler...
|
|
||||||
|
|
||||||
```apache
|
|
||||||
<VirtualHost *:443>
|
|
||||||
[ blah blah ]
|
|
||||||
<Location /vault/> #adjust here if necessary
|
|
||||||
ProxyPass http://127.0.0.1:8000/vault/ upgrade=websocket
|
|
||||||
ProxyPreserveHost On
|
|
||||||
ProxyRequests Off # ... is the default, but as a safety-net
|
|
||||||
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
|
||||||
</Location>
|
|
||||||
</VirtualHost>
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Traefik v2 (docker-compose example by hwwilliams, gzfrozen)</summary><br/>
|
<summary>Traefik v2 (docker-compose example by hwwilliams, gzfrozen)</summary><br/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user