
Originally Posted by
simensen
I upgraded to 3.1.2 and things seem to be looking better. However, it looks like the server is binding to 127.0.0.1:8080 and I am not sure how I can change that.
Code:
...
[24/Nov/2009:07:17:28] ENGINE Started monitor thread 'Autoreloader'.
[24/Nov/2009:07:17:28] ENGINE Serving on 127.0.0.1:8080
[24/Nov/2009:07:17:28] ENGINE Bus STARTED
...
I am running the sample application on a headless system and want to be able to access it from my desktop's browser. Can I configure this easily?
If you look in the part of the code that runs the actual CherryPy app, you will see something like this:
Code:
conf = {'/': {"tools.staticdir.root": os.getcwd(),
"tools.sessions.on": True,
"tools.filterChainProxy.on": True},
"/images": {"tools.staticdir.on": True,
"tools.staticdir.dir": "images"},
"/html": {"tools.staticdir.on": True,
"tools.staticdir.dir": "html"}
}
You can override the IP address and port number used for hosting like this:
Code:
conf = {'/': {"server.socket_host": "<your IP address>",
"server.socket_port": <your port number>,
"tools.staticdir.root": os.getcwd(),
"tools.sessions.on": True,
"tools.filterChainProxy.on": True},
"/images": {"tools.staticdir.on": True,
"tools.staticdir.dir": "images"},
"/html": {"tools.staticdir.on": True,
"tools.staticdir.dir": "html"}
}