From 2118939281733dbea5a5c122359edb1c32e70c80 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Wed, 12 Mar 2014 16:49:25 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superTornado.py b/superTornado.py index fcc1053..b191c94 100644 --- a/superTornado.py +++ b/superTornado.py @@ -151,6 +151,7 @@ application = tornado.web.Application([ (r"/unauthorized", UnauthorizedHandler), (r"/disconnection", DisconnectionHandler), (r"/socket", WSocketHandler), + (r"/ssl/(.*)", tornado.web.StaticFileHandler,{"path":"./ssl"},), (r"/(favicon.ico)", tornado.web.StaticFileHandler,{"path":"./v/"},), (r"/style/(.*)", tornado.web.StaticFileHandler,{"path":"./v/style"},), (r"/images/(.*)", tornado.web.StaticFileHandler,{"path":"./v/images"},), @@ -205,7 +206,10 @@ if __name__ == "__main__": try : log.printL("->Server Start ...",lvl.INFO) tornado.options.parse_command_line() - http_server = tornado.httpserver.HTTPServer(application) + http_server = tornado.httpserver.HTTPServer(application,ssl_options={ + "certfile": os.path.join("/ssl", "server.crt"), + "keyfile": os.path.join("/ssl", "server.key"), + }) http_server.listen(portServ) log.printL("->Server Start Successfully !",lvl.SUCCESS) tornado.ioloop.IOLoop.instance().start()