Is there any way to serve a SSL site using the Python Flask (no apache/nginx frontend) framework with the two following caveats?
- Nothing additional can be compiled on the host (testing on a base Xubuntu 14.04 image, python 2.7.6 is the default interpreter).
- No privileges on the local host available, so no packages can be installed to the system
I am using VirtualEnv to set up the requirements and then running a standalone Flask application from within the VirtualEnv environment.
As best I can tell, this is not possible.
- This guy ran into the same problem (requires Python 2.7.9, which violates requirement 1 and, as best as I can tell, nothing has 2.7.9 installed by default): http://www.sadafnoor.com/blog/ssl-https-from-python-flask/
- This workaround requires pyOpenSSL to be installed which breaks because of a missing package: http://flask.pocoo.org/snippets/111/, resolution to install pyopenssl: https://askubuntu.com/questions/499714/error-installing-scrapy-in-virtualenv-using-pip
In summary, my goal is to serve a Python Flask site over HTTPS without requiring the installation or compilation of any other programs (self signed cert if desired). Installing via the VirtualEnv pip command is fine, but no host level packages via apt-get or the like.
I have tried several methods unsuccessfully (http://kracekumar.com/post/54437887454/ssl-for-flask-local-development and http://flask.pocoo.org/snippets/111/).
Am I missing something or am I just going to have to install a web server front end to handle SSL?
Thanks!