V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
myyou
V2EX  ›  Python

flask+蓝图( blueprint)+mod_wsgi+apache2 如何配置?

  •  
  •   myyou · 2015-12-22 09:59:31 +08:00 · 2940 次点击
    这是一个创建于 3041 天前的主题,其中的信息可能已经有所发展或是发生改变。
    网上找的都是以一个简单的 hello , world !例子讲解的,当有蓝图的情况下,就不知道如何配置了。有没有在蓝图下配置成功的?
    6 条回复    2015-12-23 22:16:10 +08:00
    saberlion
        1
    saberlion  
       2015-12-22 10:25:14 +08:00
    一般 supervisor + gunicorn/uwsgi + nginx 比较多,可以参考别人的
    fangdingjun
        2
    fangdingjun  
       2015-12-22 10:29:41 +08:00
    难道不是这样子的吗

    #app.py
    application = Flask(.....)
    application.register_blueprint(...)

    # httpd.conf
    WSGIAlias /xxxx /path/to/app.py
    linnchord
        3
    linnchord  
       2015-12-22 11:36:44 +08:00 via Smartisan T1
    blueprint 是框架内置开发特性,和部署方式有什么关系?
    ethego
        4
    ethego  
       2015-12-22 12:00:46 +08:00
    应该和 nginx 代理差不多, apache 把请求通过端口或者 socket 文件转发到 mod wsgi 就可以了。
    fsoinet
        5
    fsoinet  
       2015-12-22 14:20:17 +08:00
    wsgi 配置,跟有没有蓝图有关系?
    azkb
        6
    azkb  
       2015-12-23 22:16:10 +08:00 via iPad
    apache 里没用 mod_wsgi ,而之 apache 只用反向代理+gunicorn+flask
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1544 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 16:56 · PVG 00:56 · LAX 09:56 · JFK 12:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.