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;
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
add a comment |
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
add a comment |
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
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
python python-2.7 flask wsgi cherrypy
edited Mar 26 at 23:34
Kay
asked Mar 26 at 21:23
KayKay
11810 bronze badges
11810 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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()
AFAIR you could even omitmy_app = WSGIPathInfoDispatcher('/': app)
line and feedapp
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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()
AFAIR you could even omitmy_app = WSGIPathInfoDispatcher('/': app)
line and feedapp
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
add a comment |
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()
AFAIR you could even omitmy_app = WSGIPathInfoDispatcher('/': app)
line and feedapp
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
add a comment |
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()
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()
edited Mar 27 at 0:53
answered Mar 26 at 23:37
KayKay
11810 bronze badges
11810 bronze badges
AFAIR you could even omitmy_app = WSGIPathInfoDispatcher('/': app)
line and feedapp
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
add a comment |
AFAIR you could even omitmy_app = WSGIPathInfoDispatcher('/': app)
line and feedapp
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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