How to run a Flask app on CherryPy WSGI server (Cheroot) using HTTPS?Using CherryPy/Cherryd to launch multiple Flask instancesHow to get data received in Flask requestHow can I use an app-factory in Flask / WSGI servers and why might it be unsafe?How to organize a multiple apps server with CherryPy?How to monitor this cherrypy web application with newrelic and probably convert it to wsgiIssues with Deploying Flask app on Ubuntu 14.04 VPS (Digital Ocean)Run cherrypy example on openshiftFlask app hosted by CherryPy: OPTIONS returns 404Deploying Flask app on CherryPy serverPython Flask REST API on Windows Cherrypy

Why didn't Stark and Nebula use jump points with their ship to go back to Earth?

How close to the Sun would you have to be to hear it?

Why did some Apollo missions carry a grenade launcher?

What is a good example for artistic ND filter applications?

What does "in official capacity" mean?

How do I make my photos have more impact?

Why did I lose on time with 3 pawns vs Knight. Shouldn't it be a draw?

Raindrops in Python

Verb Classification of あげる (to give)

Would it take any sort of amendment to make DC a state?

What language is Raven using for her attack in the new 52?

How can I convert a linear narrative into a branching narrative?

What is the source of this clause, often used to mark the completion of something?

Why are subdominants unstable?

Should students have access to past exams or an exam bank?

My employer is refusing to give me the pay that was advertised after an internal job move

"DDoouubbllee ssppeeaakk!!"

What are the cons of stateless password generators?

How do you deal with characters with multiple races?

Was the Psych theme song written for the show?

Is Ear Protection Necessary For General Aviation Airplanes?

Exploiting the delay when a festival ticket is scanned

How did the SysRq key get onto modern keyboards if it's rarely used?

How can flights operated by the same company have such different prices when marketed by another?



How to run a Flask app on CherryPy WSGI server (Cheroot) using HTTPS?


Using CherryPy/Cherryd to launch multiple Flask instancesHow to get data received in Flask requestHow can I use an app-factory in Flask / WSGI servers and why might it be unsafe?How to organize a multiple apps server with CherryPy?How to monitor this cherrypy web application with newrelic and probably convert it to wsgiIssues with Deploying Flask app on Ubuntu 14.04 VPS (Digital Ocean)Run cherrypy example on openshiftFlask app hosted by CherryPy: OPTIONS returns 404Deploying Flask app on CherryPy serverPython Flask REST API on Windows Cherrypy






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am running a Python 2.7 Flask app on CherryPy Cheroot WSGI server usinh HTTP now as below.



from cheroot.wsgi import Server as WSGIServer
from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher

from MyFlaskApp import app

d = WSGIPathInfoDispatcher('/': app)
server = WSGIServer(('0.0.0.0', 80), d)

if __name__ == '__main__':
try:
server.start()
except KeyboardInterrupt:
server.stop()


What would I have to to move to HTTPS from here?
I found below instruction, but it does not seem to applicable to my application.



from cheroot.server import HTTPServer
from cheroot.ssl.builtin import BuiltinSSLAdapter

HTTPServer.ssl_adapter = BuiltinSSLAdapter(
certificate='cert/domain.crt',
private_key='cert/domain.key')


Can I apply above sample to my Flask app on Cheroot? If not, what would be a simple example for Flask app on Cheroot for HTTPS?










share|improve this question
































    0















    I am running a Python 2.7 Flask app on CherryPy Cheroot WSGI server usinh HTTP now as below.



    from cheroot.wsgi import Server as WSGIServer
    from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher

    from MyFlaskApp import app

    d = WSGIPathInfoDispatcher('/': app)
    server = WSGIServer(('0.0.0.0', 80), d)

    if __name__ == '__main__':
    try:
    server.start()
    except KeyboardInterrupt:
    server.stop()


    What would I have to to move to HTTPS from here?
    I found below instruction, but it does not seem to applicable to my application.



    from cheroot.server import HTTPServer
    from cheroot.ssl.builtin import BuiltinSSLAdapter

    HTTPServer.ssl_adapter = BuiltinSSLAdapter(
    certificate='cert/domain.crt',
    private_key='cert/domain.key')


    Can I apply above sample to my Flask app on Cheroot? If not, what would be a simple example for Flask app on Cheroot for HTTPS?










    share|improve this question




























      0












      0








      0








      I am running a Python 2.7 Flask app on CherryPy Cheroot WSGI server usinh HTTP now as below.



      from cheroot.wsgi import Server as WSGIServer
      from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher

      from MyFlaskApp import app

      d = WSGIPathInfoDispatcher('/': app)
      server = WSGIServer(('0.0.0.0', 80), d)

      if __name__ == '__main__':
      try:
      server.start()
      except KeyboardInterrupt:
      server.stop()


      What would I have to to move to HTTPS from here?
      I found below instruction, but it does not seem to applicable to my application.



      from cheroot.server import HTTPServer
      from cheroot.ssl.builtin import BuiltinSSLAdapter

      HTTPServer.ssl_adapter = BuiltinSSLAdapter(
      certificate='cert/domain.crt',
      private_key='cert/domain.key')


      Can I apply above sample to my Flask app on Cheroot? If not, what would be a simple example for Flask app on Cheroot for HTTPS?










      share|improve this question
















      I am running a Python 2.7 Flask app on CherryPy Cheroot WSGI server usinh HTTP now as below.



      from cheroot.wsgi import Server as WSGIServer
      from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher

      from MyFlaskApp import app

      d = WSGIPathInfoDispatcher('/': app)
      server = WSGIServer(('0.0.0.0', 80), d)

      if __name__ == '__main__':
      try:
      server.start()
      except KeyboardInterrupt:
      server.stop()


      What would I have to to move to HTTPS from here?
      I found below instruction, but it does not seem to applicable to my application.



      from cheroot.server import HTTPServer
      from cheroot.ssl.builtin import BuiltinSSLAdapter

      HTTPServer.ssl_adapter = BuiltinSSLAdapter(
      certificate='cert/domain.crt',
      private_key='cert/domain.key')


      Can I apply above sample to my Flask app on Cheroot? If not, what would be a simple example for Flask app on Cheroot for HTTPS?







      python python-2.7 flask wsgi cherrypy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 23:34







      Kay

















      asked Mar 26 at 21:23









      KayKay

      11810 bronze badges




      11810 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          2














          I figured out the necessary modification.
          Not much information on Flask app on Cheroot with https, so I thought I'd share it.



          from cheroot.wsgi import Server as WSGIServer
          from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher
          from cheroot.ssl.builtin import BuiltinSSLAdapter

          from MyFlaskApp import app

          my_app = WSGIPathInfoDispatcher('/': app)
          server = WSGIServer(('0.0.0.0', 443), my_app)

          ssl_cert = "[path]/myapp.crt"
          ssl_key = "[path]/myapp.key"
          server.ssl_adapter = BuiltinSSLAdapter(ssl_cert, ssl_key, None)

          if __name__ == '__main__':
          try:
          server.start()
          except KeyboardInterrupt:
          server.stop()





          share|improve this answer



























          • AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

            – webKnjaZ
            Apr 1 at 12:23











          • Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

            – webKnjaZ
            Apr 1 at 12:24










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366395%2fhow-to-run-a-flask-app-on-cherrypy-wsgi-server-cheroot-using-https%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          I figured out the necessary modification.
          Not much information on Flask app on Cheroot with https, so I thought I'd share it.



          from cheroot.wsgi import Server as WSGIServer
          from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher
          from cheroot.ssl.builtin import BuiltinSSLAdapter

          from MyFlaskApp import app

          my_app = WSGIPathInfoDispatcher('/': app)
          server = WSGIServer(('0.0.0.0', 443), my_app)

          ssl_cert = "[path]/myapp.crt"
          ssl_key = "[path]/myapp.key"
          server.ssl_adapter = BuiltinSSLAdapter(ssl_cert, ssl_key, None)

          if __name__ == '__main__':
          try:
          server.start()
          except KeyboardInterrupt:
          server.stop()





          share|improve this answer



























          • AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

            – webKnjaZ
            Apr 1 at 12:23











          • Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

            – webKnjaZ
            Apr 1 at 12:24















          2














          I figured out the necessary modification.
          Not much information on Flask app on Cheroot with https, so I thought I'd share it.



          from cheroot.wsgi import Server as WSGIServer
          from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher
          from cheroot.ssl.builtin import BuiltinSSLAdapter

          from MyFlaskApp import app

          my_app = WSGIPathInfoDispatcher('/': app)
          server = WSGIServer(('0.0.0.0', 443), my_app)

          ssl_cert = "[path]/myapp.crt"
          ssl_key = "[path]/myapp.key"
          server.ssl_adapter = BuiltinSSLAdapter(ssl_cert, ssl_key, None)

          if __name__ == '__main__':
          try:
          server.start()
          except KeyboardInterrupt:
          server.stop()





          share|improve this answer



























          • AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

            – webKnjaZ
            Apr 1 at 12:23











          • Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

            – webKnjaZ
            Apr 1 at 12:24













          2












          2








          2







          I figured out the necessary modification.
          Not much information on Flask app on Cheroot with https, so I thought I'd share it.



          from cheroot.wsgi import Server as WSGIServer
          from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher
          from cheroot.ssl.builtin import BuiltinSSLAdapter

          from MyFlaskApp import app

          my_app = WSGIPathInfoDispatcher('/': app)
          server = WSGIServer(('0.0.0.0', 443), my_app)

          ssl_cert = "[path]/myapp.crt"
          ssl_key = "[path]/myapp.key"
          server.ssl_adapter = BuiltinSSLAdapter(ssl_cert, ssl_key, None)

          if __name__ == '__main__':
          try:
          server.start()
          except KeyboardInterrupt:
          server.stop()





          share|improve this answer















          I figured out the necessary modification.
          Not much information on Flask app on Cheroot with https, so I thought I'd share it.



          from cheroot.wsgi import Server as WSGIServer
          from cheroot.wsgi import PathInfoDispatcher as WSGIPathInfoDispatcher
          from cheroot.ssl.builtin import BuiltinSSLAdapter

          from MyFlaskApp import app

          my_app = WSGIPathInfoDispatcher('/': app)
          server = WSGIServer(('0.0.0.0', 443), my_app)

          ssl_cert = "[path]/myapp.crt"
          ssl_key = "[path]/myapp.key"
          server.ssl_adapter = BuiltinSSLAdapter(ssl_cert, ssl_key, None)

          if __name__ == '__main__':
          try:
          server.start()
          except KeyboardInterrupt:
          server.stop()






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 27 at 0:53

























          answered Mar 26 at 23:37









          KayKay

          11810 bronze badges




          11810 bronze badges















          • AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

            – webKnjaZ
            Apr 1 at 12:23











          • Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

            – webKnjaZ
            Apr 1 at 12:24

















          • AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

            – webKnjaZ
            Apr 1 at 12:23











          • Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

            – webKnjaZ
            Apr 1 at 12:24
















          AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

          – webKnjaZ
          Apr 1 at 12:23





          AFAIR you could even omit my_app = WSGIPathInfoDispatcher('/': app) line and feed app to the WSGI server directly.

          – webKnjaZ
          Apr 1 at 12:23













          Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

          – webKnjaZ
          Apr 1 at 12:24





          Oh and hey here's an obligatory reminder about Python 2.7 EOL: pythonclock.org

          – webKnjaZ
          Apr 1 at 12:24








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366395%2fhow-to-run-a-flask-app-on-cherrypy-wsgi-server-cheroot-using-https%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현