zoukankan      html  css  js  c++  java
  • Nginx+uWSGI+bottle 在Linux上部署

    在/data/lujianxing/bottle 文件夹中创建三个文件:

    bottle.py bottle的源文件

    a.py

    from bottle import Bottle, run
    mybottle = Bottle()
    @mybottle.route('/')
    def index():
      return 'default_app'
    application=mybottle

    uwsgi.xml

    <uwsgi>  
    <socket>0.0.0.0:10005</socket>  
    <listen>20</listen>  
    <master>true</master>  
    <pidfile>/usr/local/nginx/uwsgi.pid</pidfile>  
    <processes>8</processes>  
    <module>a</module>
    <pythonpath>/data/lujianxing/bottle/</pythonpath> 
    <profiler>true</profiler>  
    <enable-threads>true</enable-threads>  
    <logdate>true</logdate>  
    </uwsgi>

    通过命令  uwsgi -x uwsgi.xml 启动服务

    nginx配置:

    server {
                    listen 10015;
                    server_name test.com;
                    access_log /tmp/log;
                    error_log /tmp/log1;
                    location / {
                            uwsgi_pass 127.0.0.1:10005;
                            include  uwsgi_params;
                    }
                   
    
            }
  • 相关阅读:
    flask虚拟环境
    db.Column
    flask_cors跨域请求
    app.config.from_object
    jquery链式原理.html
    swiper轮播
    jquery引用
    animate.html
    设置和获取html里面的内容.html
    jquery获取dom属性方法
  • 原文地址:https://www.cnblogs.com/Xjng/p/3754635.html
Copyright © 2011-2022 走看看