From 5af8d43b9ee0543ff212e5c51fb0e750a2b83955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 11 May 2019 01:14:51 +0200 Subject: Use sockets for etherpad-lite --- nixops/modules/websites/tools/ether.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'nixops/modules/websites') diff --git a/nixops/modules/websites/tools/ether.nix b/nixops/modules/websites/tools/ether.nix index 3efa363..9c78b0c 100644 --- a/nixops/modules/websites/tools/ether.nix +++ b/nixops/modules/websites/tools/ether.nix @@ -5,6 +5,7 @@ let # Make sure we’re not rebuilding whole libreoffice just because of a # dependency libreoffice = (import { overlays = []; }).libreoffice-fresh; + ecfg = config.services.etherpad-lite; in { options.services.myWebsites.tools.etherpad-lite = { enable = lib.mkEnableOption "enable etherpad's website"; @@ -30,8 +31,8 @@ in { "title": "Etherpad", "favicon": "favicon.ico", - "ip": "127.0.0.1", - "port" : ${env.listenPort}, + "ip": "", + "port" : "${ecfg.sockets.node}", "showSettingsInAdminPage" : false, "dbType" : "postgres", "dbSettings" : { @@ -154,14 +155,14 @@ in { RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] - RewriteRule /(.*) ws://localhost:${env.listenPort}/$1 [P,L] + RewriteRule /(.*) unix://${ecfg.sockets.node}|ws://ether.immae.eu/$1 [P,NE,QSA,L] ProxyVia On ProxyRequests Off ProxyPreserveHost On - ProxyPass / http://localhost:${env.listenPort}/ - ProxyPassReverse / http://localhost:${env.listenPort}/ + ProxyPass / unix://${ecfg.sockets.node}|http://ether.immae.eu/ + ProxyPassReverse / unix://${ecfg.sockets.node}|http://ether.immae.eu/ Options FollowSymLinks MultiViews AllowOverride None -- cgit v1.2.3