首页 > 解决方案 > 用于生产的 Python http 服务器

问题描述

Python 文档声称,“不建议将 http.server 用于生产。它只实现基本的安全检查。”

是否有另一个简单易用的 Python 服务器(如 http.server),具有“高级”安全检查功能,可用于生产?

(我想在 Raspberri Pi 上运行 http 服务器,它将为静态网站提供服务)

谢谢!

标签: pythonpython-3.xsecurityhttpserver

解决方案


我推荐 Gunicorn 或其他 WSGI Server 之类的东西。

https://gunicorn.org/

此外,Flask 文档中有一些关于部署 Python 应用程序的好提示,这些提示不仅适用于 Flask。

https://flask.palletsprojects.com/en/1.1.x/deploying/


推荐阅读