Reputation: 11
I have created a simple flask web application. I have managed to deploy it to the internet using waitress and I connected a domain name to it. My only problem is I am struggling to make the website secure (https). I have bought a SSL certificate but I don't know integrate it into the web application.
The link to my website is http://192.168.1.105/ or http://macroperspective.net/ My domain name is "macroperspective.net" My python code is:
from flask import Flask
from waitress import serve
app = Flask(__name__)
@app.route('/')
def home():
return "hello world"
if __name__ == "__main__":
serve(app, host='192.168.1.105', port=80, url_scheme='https')
I have read the documentation of flask waitress and it seems that you can't make the web app secure using waitress. If my research is correct, I need to set up a reverse proxy server using nginx or apache. I don't really know it this is the case or how to set up a reverse proxy server.
Upvotes: 1
Views: 274