From b32855f1a4ae6ea8dd8636009788a68ad99927aa Mon Sep 17 00:00:00 2001 From: Moul Date: Fri, 9 Mar 2018 08:37:46 +0100 Subject: [PATCH] [enh] #64: configure Nginx and Duniter to handle WS2P API. --- conf/nginx.conf | 6 ++++++ scripts/install | 1 + 2 files changed, 7 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 26b82ef..505fa9e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -43,4 +43,10 @@ location / { access_by_lua_file /usr/share/ssowat/access.lua; } + location /ws2p { + proxy_pass http://127.0.0.1:20901; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } } diff --git a/scripts/install b/scripts/install index 9f6e58a..80d1bff 100755 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,7 @@ INSTALL_DUNITER_DEBIAN_PACKAGE # Configure Duniter node sudo duniter config --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 80 --noupnp sudo duniter config --addep "BMAS $domain 443" +sudo duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-noupnp # Reset Duniter node's existing data (blockchain, not conf) sudo duniter reset data > /dev/null