• Nignx官方文档:Module ngx_http_uwsgi_module
    http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_modifier1
  • uWSGI官方文档:
    https://uwsgi-docs.readthedocs.io/en/latest/
    uWSGI官方文档:Nginx support
    https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html

文章目录

  • # WSGI,uwsgi, uWSGI区分
  • # uWSGI 快速入门
    • uWSGI 快速入门:第一个程序 --http --wsgi-file
    • uWSGI 快速入门:指定线程、进程 --processes
    • uWSGI 快速入门:状态监控 --stats
    • uWSGI 快速入门:通过nginx访问

# WSGI,uwsgi, uWSGI区分

https://blog.csdn.net/gymaisyl/article/details/85038932

需要注意 WSGI/uwsgi/uWSGI这三个概念的区分

  • WSGI(Web Server Gateway Interface,Web服务器网关接口)
    WSGI是一个规范协议
    定义了Web服务器如何与Python应用程序进行交互,使得使用Python写的Web应用程序可以和Web服务器对接起来。

    在WSGI中定义了两个角色,Web服务器端称为server或者gateway,应用程序端称为application或者framework(因为WSGI的应用程序端的规范一般都是由具体的框架来实现的)。我们下面统一使用server和application这两个术语。
    server端会先收到用户的请求,然后会根据规范的要求调用application端,如下图所示:

    调用的结果会被封装成HTTP响应后再发送给客户端。

    要使用WSGI,需要分别实现server角色和application角色。

    • Application端 的实现一般是由Python的各种框架来实现的,比如Django, web.py等(Flask、webpy、Django、CherryPy等等都自带WSGI,不过性能不好),一般开发者不需要关心WSGI的实现,框架会提供接口让开发者获取HTTP请求的内容以及发送HTTP响应;
    • Server端 的实现会比较复杂一点,这个主要是因为软件架构的原因。一般常用的Web服务器,如Apache和nginx,都不会内置WSGI的支持,而是通过扩展来完成。
      比如
    1. Apache服务器,会通过扩展模块mod_wsgi来支持WSGI。Apache和mod_wsgi之间通过程序内部接口传递信息,mod_wsgi会实现WSGI的server端、进程管理以及对application的调用。
    2. Nginx上一般是用proxy的方式,用nginx的协议将请求封装好,发送给应用服务器,比如uWSGI,应用服务器会实现WSGI的服务端、进程管理以及对application的调用。
  • UWSGI
    是一个二进制协议,可以携带任何类型的数据。一个uwsgi分组的头4个字节描述了这个分组包含的数据类型
    uwsgi是一种线路协议而不是通信协议,在此常用于在uWSGI服务器与其他网络服务器的数据通信

  • uWSGI
    uWSGI是一种web服务器,是实现了uwsgi和WSGI两种协议的Web服务器
    (小写u是服务器、大写U是通信协议)

    WSGI,uwsgi, uWSGI: 实现过程图解

    uWSGI、Niginx、Flask之间的对话

    • Nginx:接收请求
    • uWSGI:设置环境变量
    • Flask:处理请求、生成响应

    问题:为什么有了uWSGI还要nginx?
    因为nginx具备优秀的静态内容处理功能,然后将动态内容转发给uWSGI服务器,这样额可以达到很好的客户端响应

# uWSGI 快速入门

官方教程:Quickstart for Python/WSGI applications:https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#quickstart-for-python-wsgi-applications

环境

lawsssscat@lawsssscat-virtual-machine:~/uwsgi/uwsgi-2.0.20$ uname  -svoir
Linux 5.13.0-37-generic #42~20.04.1-Ubuntu SMP Tue Mar 15 15:44:28 UTC 2022 x86_64 GNU/Linux
apt-get install build-essential python-dev
apt-get install python3-dev

安装

通过pip❌或编译⭕️

pip install uwsgi
wget https://projects.unbit.it/downloads/uwsgi-latest.tar.gz
tar zxvf uwsgi-latest.tar.gz
cd <dir>
make

编译结果

################# uWSGI configuration #################kernel = Linux
execinfo = False
ifaddrs = True
locking = pthread_mutex
event = epoll
timer = timerfd
filemonitor = inotify
pcre = True
routing = True
capabilities = False
yaml = embedded
json = False
ssl = True
xml = expat
debug = False
plugin_dir = .
zlib = True
ucontext = True
malloc = libc############## end of uWSGI configuration #############
total build time: 1 seconds
*** uWSGI is ready, launch it with ./uwsgi ***lawsssscat@lawsssscat-virtual-machine:~/uwsgi/uwsgi-2.0.20$ ll | grep uwsgi
-rw-rw-r--   1 lawsssscat lawsssscat     665 10月  6 13:22 mongrel2-uwsgi.conf
-rw-rw-r--   1 lawsssscat lawsssscat    5639 10月  6 13:22 setup.pyuwsgi.py
-rwxrwxr-x   1 lawsssscat lawsssscat 1444496 3月  25 21:04 uwsgi*
-rw-rw-r--   1 lawsssscat lawsssscat    4332 3月  25 21:04 uwsgibuild.lastcflags
-rw-rw-r--   1 lawsssscat lawsssscat      21 3月  25 21:11 uwsgibuild.lastprofile
-rw-rw-r--   1 lawsssscat lawsssscat      35 3月  25 21:04 uwsgibuild.log
-rw-rw-r--   1 lawsssscat lawsssscat   62132 10月  6 13:22 uwsgiconfig.py
-rw-rw-r--   1 lawsssscat lawsssscat   10392 10月  6 13:22 uwsgidecorators.py
-rw-rw-r--   1 lawsssscat lawsssscat    2839 10月  6 13:22 uwsgidsl.rb
-rw-rw-r--   1 lawsssscat lawsssscat     557 10月  6 13:22 uwsgi.gemspec
-rw-rw-r--   1 lawsssscat lawsssscat  127572 10月  6 13:22 uwsgi.h
-rw-rw-r--   1 lawsssscat lawsssscat     134 10月  6 13:22 uwsgi_main.clawsssscat@lawsssscat-virtual-machine:~/uwsgi/uwsgi-2.0.20$ sudo chown root:root uwsgi
lawsssscat@lawsssscat-virtual-machine:~/uwsgi/uwsgi-2.0.20$ mv uwsgi /usr/local/
lawsssscat@lawsssscat-virtual-machine:~$ uwsgi --version
2.0.20

uWSGI 快速入门:第一个程序 --http --wsgi-file

lawsssscat@lawsssscat-virtual-machine:~/uwsgi$ mkdir app
lawsssscat@lawsssscat-virtual-machine:~/uwsgi$ cd app/
lawsssscat@lawsssscat-virtual-machine:~/uwsgi/app$ vim helloworld.pydef application(env, start_response):start_response('200 OK', [('Content-Type','text/html')])return [b"Hello World"]lawsssscat@lawsssscat-virtual-machine:~/uwsgi/app$ uwsgi --http :9090 --wsgi-file helloworld.py
nodename: lawsssscat-virtual-machine
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/lawsssscat/uwsgi/app
detected binary path: /usr/local/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 63575
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :9090 fd 4
spawned uWSGI http 1 (pid: 31796)
uwsgi socket 0 bound to TCP address 127.0.0.1:39035 (port auto-assigned) fd 3
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x55749a707020
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72920 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x55749a707020 pid: 31795 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 31795, cores: 1)

浏览器访问 http://192.168.1.101:9090/

console

[pid: 31795|app: 0|req: 3/3] 192.168.1.10 () {40 vars in 742 bytes} [Fri Mar 25 21:22:18 2022] GET / => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
[pid: 31795|app: 0|req: 4/4] 192.168.1.10 () {38 vars in 669 bytes} [Fri Mar 25 21:22:18 2022] GET /favicon.ico => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)

uWSGI 快速入门:指定线程、进程 --processes

uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2

这将生成 4 个进程(每个进程有 2 个线程)、一个主进程(当它们死亡时将重新生成您的进程)

ssh1

lawsssscat@lawsssscat-virtual-machine:~/uwsgi/app$ uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
*** Starting uWSGI 2.0.20 (64bit) on [Fri Mar 25 21:38:43 2022] ***
compiled with version: 9.4.0 on 25 March 2022 13:01:49
os: Linux-5.13.0-37-generic #42~20.04.1-Ubuntu SMP Tue Mar 15 15:44:28 UTC 2022
nodename: lawsssscat-virtual-machine
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/lawsssscat/uwsgi/app
detected binary path: /usr/local/bin/uwsgi
your processes number limit is 63575
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :9090 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:36509 (port auto-assigned) fd 3
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0]
Python main interpreter initialized at 0x559218bed160
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 416880 bytes (407 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
failed to open python file foobar.py
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 38784)
spawned uWSGI worker 1 (pid: 38785, cores: 2)
spawned uWSGI worker 2 (pid: 38786, cores: 2)
spawned uWSGI worker 3 (pid: 38787, cores: 2)
spawned uWSGI worker 4 (pid: 38788, cores: 2)
spawned uWSGI http 1 (pid: 38789)

ssh2

lawsssscat@lawsssscat-virtual-machine:~$ ps -ef | grep uwsgi
lawssss+   38784   24091  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   38785   38784  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   38786   38784  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   38787   38784  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   38788   38784  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   38789   38784  0 21:38 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2
lawssss+   39066   34205  0 21:39 pts/1    00:00:00 grep --color=auto uwsgi

uWSGI 快速入门:状态监控 --stats

uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191

开放9191端口,提供服务状态。服务状态可以通过uwsgitop查看

pip install uwsgitop

ssh1

lawsssscat@lawsssscat-virtual-machine:~/uwsgi/app$ uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
*** Starting uWSGI 2.0.20 (64bit) on [Fri Mar 25 21:42:28 2022] ***
compiled with version: 9.4.0 on 25 March 2022 13:01:49
os: Linux-5.13.0-37-generic #42~20.04.1-Ubuntu SMP Tue Mar 15 15:44:28 UTC 2022
nodename: lawsssscat-virtual-machine
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/lawsssscat/uwsgi/app
detected binary path: /usr/local/bin/uwsgi
your processes number limit is 63575
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :9090 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:37803 (port auto-assigned) fd 3
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0]
Python main interpreter initialized at 0x55f96fb811d0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 416880 bytes (407 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
failed to open python file foobar.py
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 40156)
spawned uWSGI worker 1 (pid: 40157, cores: 2)
spawned uWSGI worker 2 (pid: 40158, cores: 2)
spawned uWSGI worker 3 (pid: 40159, cores: 2)
spawned uWSGI worker 4 (pid: 40160, cores: 2)
*** Stats server enabled on 127.0.0.1:9191 fd: 18 ***
spawned uWSGI http 1 (pid: 40161)

ssh2

lawsssscat@lawsssscat-virtual-machine:~$ ps -ef | grep uwsgi
lawssss+   40156   24091  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40157   40156  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40158   40156  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40159   40156  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40160   40156  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40161   40156  0 21:42 pts/0    00:00:00 uwsgi --http :9090 --wsgi-file foobar.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
lawssss+   40280   34205  0 21:42 pts/1    00:00:00 grep --color=auto uwsgi
lawsssscat@lawsssscat-virtual-machine:~$
lawsssscat@lawsssscat-virtual-machine:~$
lawsssscat@lawsssscat-virtual-machine:~$
lawsssscat@lawsssscat-virtual-machine:~$ netstat -utlpn | grep uwsgi
(Not all processes could be identified, non-owned process infowill not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:37803         0.0.0.0:*               LISTEN      40156/uwsgi
tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN      40156/uwsgi
tcp        0      0 127.0.0.1:9191          0.0.0.0:*               LISTEN      40156/uwsgi
lawsssscat@lawsssscat-virtual-machine:~$ sudo pip install uwsgitop
Collecting uwsgitopDownloading uwsgitop-0.11.tar.gz (6.1 kB)
Building wheels for collected packages: uwsgitopBuilding wheel for uwsgitop (setup.py) ... doneCreated wheel for uwsgitop: filename=uwsgitop-0.11-py3-none-any.whl size=6422                                                                                                             sha256=ed52195cad7707d3dc637caf3d1549ac40b0272bbea7e8c4ab9cb17d838b96c3Stored in directory: /root/.cache/pip/wheels/fc/3a/77/774fafd7ba5ef2e25e9a8936                                                                                                            2e1b160beb2db35e6fde78f426
Successfully built uwsgitop
Installing collected packages: uwsgitop
Successfully installed uwsgitop-0.11
lawsssscat@lawsssscat-virtual-machine:~$ uwsgitop 127.0.0.1:9191uwsgi-2.0.20 - Fri Mar 25 21:45:46 2022 - req: 0 - RPS: 0 - lq: 0 - tx: 0
node: 127.0.0.1 - cwd: /home/lawsssscat/uwsgi/app - uid: 1000 - gid: 1000 - masterpid: 40156WID    %       PID     REQ     RPS     EXC     SIG     STATUS  AVG     RSS     VSZ     TX      ReSpwn  HC      RunT    LastSpwn1      0.0     40157   0       0       0       0       idle    0ms     0       0       0       1       0       0.0     21:42:282      0.0     40158   0       0       0       0       idle    0ms     0       0       0       1       0       0.0     21:42:283      0.0     40159   0       0       0       0       idle    0ms     0       0       0       1       0       0.0     21:42:284      0.0     40160   0       0       0       0       idle    0ms     0       0       0       1       0       0.0     21:42:28

uWSGI 快速入门:通过nginx访问

示意图

http://192.168.1.101:7788/
↓ http
nginx:7788
↓ socket
uWSGI:3031

nginx

nginx需要模块:ngx_http_uwsgi_module
参考
Nignx官方文档:Module ngx_http_uwsgi_module
http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_modifier1

root@lawsssscat-virtual-machine:~# cat /etc/nginx/conf.d/test.conf
server {listen 7788;location / {include uwsgi_params;uwsgi_pass 127.0.0.1:3031;}
}
root@lawsssscat-virtual-machine:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@lawsssscat-virtual-machine:~# service nginx restart

还没起uWSGI,所以返回502和日志报错。下面启动uWSGI

日志

2022/03/25 22:03:54 [error] 47898#47898: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.10, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://127.0.0.1:3031", host: "192.168.1.101:7788", referrer: "http://192.168.1.101:7788/"

启动uWSGI

-rw-rw-r-- 1 lawsssscat lawsssscat 127 325 21:20 helloworld.py
lawsssscat@lawsssscat-virtual-machine:~/uwsgi/app$ uwsgi --socket 127.0.0.1:3031 --wsgi-file helloworld.py --master --processes 4 --threads 2 --stats 127.0.0.1:9191
*** Starting uWSGI 2.0.20 (64bit) on [Fri Mar 25 22:26:05 2022] ***
compiled with version: 9.4.0 on 25 March 2022 13:01:49
os: Linux-5.13.0-37-generic #42~20.04.1-Ubuntu SMP Tue Mar 15 15:44:28 UTC 2022
nodename: lawsssscat-virtual-machine
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/lawsssscat/uwsgi/app
detected binary path: /usr/local/bin/uwsgi
your processes number limit is 63575
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0]
Python main interpreter initialized at 0x561834a1e0f0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 416880 bytes (407 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x561834a1e0f0 pid: 56402 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 56402)
spawned uWSGI worker 1 (pid: 56403, cores: 2)
spawned uWSGI worker 2 (pid: 56404, cores: 2)
spawned uWSGI worker 3 (pid: 56405, cores: 2)
spawned uWSGI worker 4 (pid: 56406, cores: 2)
*** Stats server enabled on 127.0.0.1:9191 fd: 15 ***
[pid: 56405|app: 0|req: 1/1] 192.168.1.10 () {44 vars in 775 bytes} [Fri Mar 25 22:26:07 2022] GET / => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
[pid: 56405|app: 0|req: 2/2] 192.168.1.10 () {42 vars in 702 bytes} [Fri Mar 25 22:26:07 2022] GET /favicon.ico => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 1)

【笔记】uWSGI + Nginx相关推荐

  1. Docker部署Django+Mysql+uWSGI+Nginx Web应用 - 笔记更新2022-01-04

    Docker 部署Django+Mysql+uWSGI+Nginx Web应用 Change logs更新记录 2022/1/4 fixed web access problem of wide ar ...

  2. flask uwsgi nginx *504* Gateway Time ou解决办法

    flask uwsgi nginx 504 Gateway Time ou解决办法 此方法有可能无效 修改 vi /etc/nginx/conf.d/配置文件名.conf 添加如下信息: uwsgi_ ...

  3. Ubuntu下Django+uWSGI+nginx部署

    本文采用uwsgi+nginx来部署django 这种方式是将nginx作为服务端前端,将接受web所有的请求,统一管理,Nginx把所有的静态请求自己处理,然后把所有非静态请求通过uwsgi传递给D ...

  4. Django+Linux+Uwsgi+Nginx项目部署文档

    Django+Linux+Uwsgi+Nginx项目部署文档 WSGI 在生产环境中使用WSGI作为python web的服务器 WSGI:全拼为Python Web服务器网关接口,Python We ...

  5. nginx 学习笔记(2) nginx新手入门

    这篇手册简单介绍了nginx,并提供了一些可以操作的简单的工作.前提是nginx已经被安装到你的服务器上.如果没有安装,请阅读上篇:nginx 学习笔记(1) nginx安装.这篇手册主要内容:1. ...

  6. uWSGI + Nginx + Django 部署

    来源:https://www.cnblogs.com/midworld/p/10992005.html 1. uWSGI 服务器 Django 默认使用 WSGI(Python Web Server ...

  7. Flask+uwsgi+Nginx环境搭建

    2019独角兽企业重金招聘Python工程师标准>>> 开源软件准备 需要的软件列表: setuptools-33.1.1.zip Python-2.7.13.tgz pip-9.0 ...

  8. 如何让nginx执行python代码_生产环境部署Python语言代码(django+uwsgi+nginx)

    本文主要向大家介绍了生产环境部署Python语言代码(django+uwsgi+nginx),通过具体的内容向大家展示,希望对大家学习Python语言有所帮助. 基础环境不做介绍,在django开发w ...

  9. 通过uwsgi+nginx启动flask的python web程序

    通过uwsgi+nginx启动flask的python web程序 一般我们启动python web程序的时候都是通过python直接启动主文件,测试的时候是可以的,当访问量大的时候就会出问题 pyt ...

  10. django+uwsgi+nginx部署

    最近线上部署运维工单系统,使用django+uwsgi+nginx部署,发现这篇文章,很详细,觉得不错,转载一下: 写了那么长时间的django,一直没跟nginx结合一下,访问的时候老是得加端口号, ...

最新文章

  1. Zeal 离线API文档浏览器
  2. python爬取图片简记
  3. CVPR 2018 MCCT:《Multi-Cue Correlation Filters for Roubust Visual Tracking》论文笔记
  4. 数字签名的java实现(RSA,DSA)
  5. MAC 下配置JavaEE开发环境
  6. 看见到洞见之引子(一)机器学习算法
  7. 【渝粤教育】国家开放大学2018年秋季 8669-21T (1)政治经济学 参考试题
  8. apt-get与dpkg常用命令
  9. systemctl自定义service
  10. 首届FineReport平台主题设计大赛火热启动
  11. 数据挖掘:模型选择——集成算法与树模型
  12. JavaScript之语句
  13. 水稻生物育种突破 国稻种芯-何登骥:功能性农业外源植物导入
  14. Java工具类之Base64Utils实现base64码转换为文件流-yellowcong
  15. 考试系统微信小程序的设计与实现
  16. lettuce连接池真有必要吗?
  17. 姿态估计1-02:FSA-Net(头部姿态估算)-源码训练测试-报错解决
  18. 功能测试与项目实战之测试计划(精辟干货)
  19. 【MATLAB】求复合函数
  20. powerbi使用说明_PowerBI动态报告嵌入到PPT中,这个方法推荐给你

热门文章

  1. android项目监听蓝牙连接,android 蓝牙ACL通讯详解
  2. requests 400错误
  3. dnn降噪_万魔降噪双旗舰耳机分享:这两款无线耳机能否取代AirPods Pro?
  4. C语言 题目 1701: 数据结构-自顶向下的赫夫曼编码
  5. vivo会用鸿蒙吗,小米OV对于是否采用鸿蒙保持沉默,原因是中国制造需要它们
  6. 给小朋友讲什么是计算机ppt,计算机是什么给小学生讲计算机知识ppt.ppt
  7. WPS常见问题01——如何禁止自动生成序号如1. 2. 3. 4.
  8. css画间距可控制的虚线
  9. java与前端的区别_java与前端的区别
  10. [linux]压缩一个文件夹内的部分文件 | 解压缩到指定路径