--- a/etwist/server.py Thu Jan 13 12:49:44 2011 +0100
+++ b/etwist/server.py Thu Jan 13 13:38:49 2011 +0100
@@ -408,7 +408,8 @@
website = server.Site(root_resource)
# serve it via standard HTTP on port set in the configuration
port = config['port'] or 8080
- reactor.listenTCP(port, website)
+ interface = config['interface']
+ reactor.listenTCP(port, website, interface=interface)
if not config.debugmode:
if sys.platform == 'win32':
raise ConfigurationError("Under windows, you must use the service management "
--- a/etwist/twconfig.py Thu Jan 13 12:49:44 2011 +0100
+++ b/etwist/twconfig.py Thu Jan 13 13:38:49 2011 +0100
@@ -45,6 +45,12 @@
'help': 'http server port number (default to 8080)',
'group': 'web', 'level': 0,
}),
+ ('interface',
+ {'type' : 'string',
+ 'default': "",
+ 'help': 'http server address on which to listen (default to everywhere)',
+ 'group': 'web', 'level': 0,
+ }),
('max-post-length',
{'type' : 'bytes',
'default': '100MB',