rlgwebd.js: listen on any address
The RLG-Web server now binds to any address instead of 127.0.0.1 only.
This commit is contained in:
parent
7e352fcc20
commit
6b209976d6
1 changed files with 6 additions and 2 deletions
|
|
@ -10,14 +10,18 @@ var fs = require('fs');
|
||||||
var child_process = require('child_process');
|
var child_process = require('child_process');
|
||||||
var daemon = require(path.join(localModules, "daemon"));
|
var daemon = require(path.join(localModules, "daemon"));
|
||||||
|
|
||||||
|
/* Configuration variables */
|
||||||
// These first two files are NOT in the chroot.
|
// These first two files are NOT in the chroot.
|
||||||
var ctlsocket = "/var/local/rlgwebd/ctl";
|
var ctlsocket = "/var/local/rlgwebd/ctl";
|
||||||
var logfile = "/var/local/rlgwebd/log";
|
var logfile = "/var/local/rlgwebd/log";
|
||||||
|
var httpPort = 8080;
|
||||||
var chrootDir = "/var/dgl/";
|
var chrootDir = "/var/dgl/";
|
||||||
var dropToUID = 501;
|
var dropToUID = 501;
|
||||||
var dropToGID = 501;
|
var dropToGID = 501;
|
||||||
var serveStaticRoot = "/var/www/"; // inside the chroot
|
var serveStaticRoot = "/var/www/"; // inside the chroot
|
||||||
var passwdfile = "/dgldir/dgl-login";
|
var passwdfile = "/dgldir/dgl-login";
|
||||||
|
|
||||||
|
/* Global state */
|
||||||
var sessions = {};
|
var sessions = {};
|
||||||
var allowlogin = true;
|
var allowlogin = true;
|
||||||
|
|
||||||
|
|
@ -722,7 +726,7 @@ ctlServer.listen(ctlsocket, function () {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
httpServer = http.createServer(webHandler);
|
httpServer = http.createServer(webHandler);
|
||||||
httpServer.listen(8080, "127.0.0.1");
|
httpServer.listen(httpPort);
|
||||||
tslog('rlgwebd running at http://127.0.0.1:8080/');
|
tslog('rlgwebd running on port %d', httpPort);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue