zoukankan      html  css  js  c++  java
  • uwsgi配置

    • 配置nginx

      server {
              listen 80 default_server;
              listen [::]:80 default_server;
      
              server_name _;
      
              location / {
                  proxy_pass http://127.0.0.1:12000;
              }
      }
      
    • 配置flask+uwsgi

      [uwsgi]
      chdir           = /usr/local/3dnest/nest_relay_service
      module          = sync
      callable        = app
      virtualenv      = /root/.virtualenvs/relay
      master          = true
      processes       = 2
      socket          = 127.0.0.1:8601
      vacuum          = true
      pidfile         = ./uwsgi.pid
      buffer-size     = 65536
      
    • 配置django+uwsgi

      [uwsgi]
      # 地址设为0.0.0.0,注意端口不可设置为外部开放端口
      http = 0.0.0.0:12000
      listen = 100
      pidfile = /usr/local/xxx/uwsgi.pid
      master = true
      # python环境的path
      home = /usr/local/xxx/envs/xx/
      # respawn processes after serving 5000 requests
      max-requests=5000
      processes = 4
      module = nest_e100.wsgi
      pythonpath= /usr/local/xxx/xx
      profiler = true
      enable-threads = true
      threads = 8
      logdate = true
      # 以守护模式运行,并指定日志路径
      daemonize = /usr/local/xxx/xx/logs/task.log
      stats = /tmp/stats_nest_e100.socket
      ignore-sigpipe = true
      ignore-write-errors = true
      disable-write-exception = true
      
  • 相关阅读:
    10年后编程还有意义吗?
    专访Jeffrey Richter:Windows 8是微软的重中之重
    x86汇编指令脚本虚拟机
    基于容器的持续交付管道
    NET Core 整合Autofac和Castle
    数据结构与算法1
    Redis集群
    react + iscroll5
    MongoDB
    WebComponent
  • 原文地址:https://www.cnblogs.com/wuxiaoshi/p/15522982.html
Copyright © 2011-2022 走看看