#!/var/www/bin/python
import cherrypy
class Root(object):
@cherrypy.expose
def index(self):
main_page = """
<html>
<head>
</head>
<body>
This is %s
</body>
</html>
"""%('CherryPy')
return main_page
if __name__ == '__main__':
cherrypy.quickstart(Root(), '/')
from cherrypy.process.plugins import Daemonizer d = Daemonizer(cherrypy.engine) d.subscribe()cherrypy.quickstart(Root(), '/')
sudo service cherry-server start|stop|restart...