From 70c0dd1d786a2f9dbeb55e512c483ec341369d53 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 27 May 2021 17:47:31 +0200 Subject: [PATCH] readme: add notes about nginx --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 91dbbbb..a1ca415 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,23 @@ webroot = /path/to/gamja Then connect to webircgateway and append `?server=/webirc/websocket/` to the URL. +### nginx + +If you use nginx as a reverse HTTP proxy, make sure to bump the default read +timeout to a value higher than the IRC server PING interval. Example: + +``` +location /socket { + proxy_pass http://127.0.0.1:8080; + proxy_read_timeout 600s; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; +} +``` + ### Development server Start your IRC WebSocket server, e.g. on port 8080. Then run: