推荐学习书目
› 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 · Dec 22, 2015 · 4304 views
    This topic created in 3931 days ago, the information mentioned may be changed or developed.
    网上找的都是以一个简单的 hello , world !例子讲解的,当有蓝图的情况下,就不知道如何配置了。有没有在蓝图下配置成功的?
    6 replies  •  2015-12-23 22:16:10 +08:00
    saberlion
        1
    saberlion  
       Dec 22, 2015
    一般 supervisor + gunicorn/uwsgi + nginx 比较多,可以参考别人的
    fangdingjun
        2
    fangdingjun  
       Dec 22, 2015
    难道不是这样子的吗

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

    # httpd.conf
    WSGIAlias /xxxx /path/to/app.py
    linnchord
        3
    linnchord  
       Dec 22, 2015 via Smartisan T1
    blueprint 是框架内置开发特性,和部署方式有什么关系?
    ethego
        4
    ethego  
       Dec 22, 2015
    应该和 nginx 代理差不多, apache 把请求通过端口或者 socket 文件转发到 mod wsgi 就可以了。
    fsoinet
        5
    fsoinet  
       Dec 22, 2015
    wsgi 配置,跟有没有蓝图有关系?
    azkb
        6
    azkb  
       Dec 23, 2015 via iPad
    apache 里没用 mod_wsgi ,而之 apache 只用反向代理+gunicorn+flask
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2787 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:01 · PVG 22:01 · LAX 07:01 · JFK 10:01
    ♥ Do have faith in what you're doing.