mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Customize host in cfg.py.
We start with a default of 127.0.0.1, because anything else is stupid. Change to 0.0.0.0 to serve to everybody.
This commit is contained in:
parent
82df0a800d
commit
3ef8e8bbc2
@ -12,6 +12,7 @@ users_dir = os.path.join(data_dir, "users")
|
||||
product_name = "Plinth"
|
||||
box_name = "FreedomBox"
|
||||
|
||||
host = 127.0.0.1
|
||||
port = 8000
|
||||
|
||||
## Do not edit below this line ##
|
||||
|
||||
@ -54,7 +54,7 @@ class Root(plugin_mount.PagePlugin):
|
||||
raise cherrypy.InternalRedirect('/router')
|
||||
else:
|
||||
raise cherrypy.InternalRedirect('/help/about')
|
||||
|
||||
|
||||
def load_modules():
|
||||
"""Import all the symlinked .py files in the modules directory and
|
||||
all the .py files in directories linked in the modules directory
|
||||
@ -121,7 +121,7 @@ def setup():
|
||||
server.subscribe()
|
||||
|
||||
# Configure default server
|
||||
cherrypy.config.update({'server.socket_host': '127.0.0.1',
|
||||
cherrypy.config.update({'server.socket_host': cfg.host,
|
||||
'server.socket_port': cfg.port,
|
||||
'server.thread_pool':10,
|
||||
'tools.staticdir.root': cfg.file_root,
|
||||
@ -130,7 +130,7 @@ def setup():
|
||||
'tools.sessions.storage_type':"file",
|
||||
'tools.sessions.timeout':90,
|
||||
'tools.sessions.storage_path':"%s/data/cherrypy_sessions" % cfg.file_root,
|
||||
|
||||
|
||||
})
|
||||
|
||||
config = {'/': {'tools.staticdir.root': '%s/static' % cfg.file_root,
|
||||
@ -142,7 +142,7 @@ def setup():
|
||||
}
|
||||
cherrypy.tree.mount(cfg.html_root, '/', config=config)
|
||||
cherrypy.engine.signal_handler.subscribe()
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
setup()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user