Page MenuHomePhabricator

D11293.id27131.diff
No OneTemporary

D11293.id27131.diff

diff --git a/src/docs/user/configuration/notifications.diviner b/src/docs/user/configuration/notifications.diviner
--- a/src/docs/user/configuration/notifications.diviner
+++ b/src/docs/user/configuration/notifications.diviner
@@ -108,3 +108,51 @@
The server also generates a log, by default in `/var/log/aphlict.log`. You can
change this location by changing `notification.log` in your configuration. The
log may contain information useful in resolving issues.
+
+Advanced Usage
+==============
+
+It is possible to route the websockets traffic for Aphlict through a reverse
+proxy, such as `nginx` (see @{article:Configuration Guide} for instructions on
+configuring `nginx`). In order to do this with `nginx`, you will require at
+least version 1.3. You can read some more information about `nginx` and
+WebSockets at http://nginx.com/blog/websocket-nginx/.
+
+The benefit of this approaching is that SSL is termination at the `nginx` layer
+and consequently there is no need to configure `notificaton.ssl-cert` and
+`notification.ssl-key` (in fact, with this approach you should //not//
+configure these options because otherwise the Aphlict server will not accept
+HTTP traffic).
+
+```lang=nginx, name=/etc/nginx/conf.d/connection_upgrade.conf
+map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+}
+```
+
+```lang=nginx, name=/etc/nginx/conf.d/websocket_pool.conf
+upstream websocket_pool {
+ ip_hash;
+ server 127.0.0.1:22280;
+}
+```
+
+```lang=nginx, name=/etc/nginx/sites-enabled/phabricator.example.com.conf
+server {
+ ...
+
+ location = /ws/ {
+ proxy_pass http://websocket_pool;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_read_timeout 999999999;
+ }
+}
+```
+
+With this approach, you should set `notification.client-uri` to
+`http://localhost:22280/ws/`. Additionally, there is no need for the Aphlict
+server to bind to `0.0.0.0` anymore, so you should start the Aphlict server
+with `./bin/aphlict start --client-host=localhost` instead.

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 7, 6:21 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7551666
Default Alt Text
D11293.id27131.diff (2 KB)

Event Timeline