added apache example with sub location (and note for ws proxy module being required)

ss89
2020-03-08 14:00:59 +01:00
parent 0ed6c5b4ee
commit 4dfdff5f0d

@@ -163,7 +163,6 @@ nginx__servers:
<details>
<summary>Apache (by fbartels)</summary><br/>
```apache
<VirtualHost *:443>
SSLEngine on
@@ -189,6 +188,41 @@ nginx__servers:
```
</details>
<details>
<summary>Apache in a sub-location (by ss89)</summary><br/>
Ensure you have the websocket proxy module loaded somewhere in your apache config.
It can look something like:
```
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so`
```
```apache
<VirtualHost *:443>
SSLEngine on
ServerName $hostname.$domainname
SSLCertificateFile ${SSLCERTIFICATE}
SSLCertificateKeyFile ${SSLKEY}
SSLCACertificateFile ${SSLCA}
${SSLCHAIN}
ErrorLog \${APACHE_LOG_DIR}/error.log
CustomLog \${APACHE_LOG_DIR}/access.log combined
<Location /bitwarden> #adjust here if necessary
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /notifications/hub(.*) ws://<SERVER>:3012/$1 [P,L]
ProxyPass http://<SERVER>:80/
ProxyPreserveHost On
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
</Location>
</VirtualHost>
```
</details>
<details>
<summary>Traefik v1 (docker-compose example)</summary><br/>