From 6b209976d603a83a30dd532a3e92e124c7ca6124 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Tue, 5 Jun 2012 09:22:17 -0700 Subject: [PATCH] rlgwebd.js: listen on any address The RLG-Web server now binds to any address instead of 127.0.0.1 only. --- rlgwebd.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rlgwebd.js b/rlgwebd.js index e8bfaee..3663a7c 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -10,14 +10,18 @@ var fs = require('fs'); var child_process = require('child_process'); var daemon = require(path.join(localModules, "daemon")); +/* Configuration variables */ // These first two files are NOT in the chroot. var ctlsocket = "/var/local/rlgwebd/ctl"; var logfile = "/var/local/rlgwebd/log"; +var httpPort = 8080; var chrootDir = "/var/dgl/"; var dropToUID = 501; var dropToGID = 501; var serveStaticRoot = "/var/www/"; // inside the chroot var passwdfile = "/dgldir/dgl-login"; + +/* Global state */ var sessions = {}; var allowlogin = true; @@ -722,7 +726,7 @@ ctlServer.listen(ctlsocket, function () { process.exit(1); } httpServer = http.createServer(webHandler); - httpServer.listen(8080, "127.0.0.1"); - tslog('rlgwebd running at http://127.0.0.1:8080/'); + httpServer.listen(httpPort); + tslog('rlgwebd running on port %d', httpPort); });