diff --git a/Proxy-examples.md b/Proxy-examples.md index 18f5e61..ed3b23d 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -163,7 +163,6 @@ nginx__servers:
Apache (by fbartels)
- ```apache SSLEngine on @@ -189,6 +188,41 @@ nginx__servers: ```
+
+Apache in a sub-location (by ss89)
+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 + + 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 + + #adjust here if necessary + RewriteEngine On + RewriteCond %{HTTP:Upgrade} =websocket [NC] + RewriteRule /notifications/hub(.*) ws://:3012/$1 [P,L] + ProxyPass http://:80/ + + ProxyPreserveHost On + RequestHeader set X-Real-IP %{REMOTE_ADDR}s + + +``` +
+
Traefik v1 (docker-compose example)