Python 3.x 如何强制gevent WSGIServer同时侦听HTTP和HTTPS

Python 3.x 如何强制gevent WSGIServer同时侦听HTTP和HTTPS,python-3.x,flask,gevent,gevent-socketio,wsgiserver,Python 3.x,Flask,Gevent,Gevent Socketio,Wsgiserver,我可以使用HTTPS访问应用程序,但是在将其转换为HTTPS后,如何将其重定向到侦听http呢 当我试图使用http访问它时,我得到以下错误 ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1056) 2020-03-30T15:58:35Z <Greenlet at 0x1d7ca90ce18: _handle_and_close_when_d

我可以使用HTTPS访问应用程序,但是在将其转换为HTTPS后,如何将其重定向到侦听http呢

当我试图使用http访问它时,我得到以下错误

    ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1056)
2020-03-30T15:58:35Z <Greenlet at 0x1d7ca90ce18: _handle_and_close_when_done(<bound method StreamServer.wrap_socket_and_handle , <bound method StreamServer.do_close of <WSGIServer, (<gevent._socket3.socket [closed]  object, fd=-1, )> failed with SSLError

这里有同样的问题这里也有同样的问题
from search_app import app
from gevent.pywsgi import WSGIServer
import os


if __name__ == '__main__':
    http_server = WSGIServer(('127.0.0.1', 5000), app, keyfile=f'{os.path.dirname(app.instance_path)}\\private.key', certfile=f'{os.path.dirname(app.instance_path)}\\xyz.crt')
    http_server.serve_forever()