1

I have written a simple Toronto running example in my remote server, and I want to access the webpage from my own computer.

The code is

tornado.options.parse_command_line()
app = tornado.web.Application(handlers=[(r'/post', MainHandler)], autoreload=False, debug=False)
http_server = tornado.httpserver.HTTPServer(app)
http_server.listen(8832)
tornado.ioloop.IOLoop.instance().start()

However, it seems I can only access it by "http://127.0.0.1:8832" in remote server(which has no GUI). And I cannot access it in my own computer by changing the IP address to its real ip. I don't know how to revise the code. Can anybody help me? Thanks a lot!

戴斯铭
  • 11
  • 1
  • Use your server's IP address in your browser. Also make sure that the port `8832` is open to public. If the server is running Ubuntu, opening ports is easy: https://stackoverflow.com/a/30252006/1925257 – xyres Dec 18 '20 at 15:30

0 Answers0