nginx+uwsgi+django的搭建笔记

测试uWsgi是否配置成功:


nginx+uwsgi+django的搭建笔记_第1张图片
image.png

.使用下面的方法测试uwsgi配置是否成功,结果如上图

(venvSOA) [root@izwz9hbv3lrr68d8bo5dvpz venvSOA]# uwsgi --http :8000 --wsgi-file /root/learn/virtualenv/venvSOA/Yiyipin/test.py

具体结果如下:
(venvSOA) [root@izwz9hbv3lrr68d8bo5dvpz Yiyipin]# cd ..
(venvSOA) [root@izwz9hbv3lrr68d8bo5dvpz venvSOA]# uwsgi --http :8000 --wsgi-file /root/learn/virtualenv/venvSOA/Yiyipin/test.py
*** Starting uWSGI 2.0.15 (64bit) on [Tue Nov 28 22:40:09 2017] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-11) on 17 November 2017 11:22:04
os: Linux-3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017
nodename: izwz9hbv3lrr68d8bo5dvpz
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /root/learn/virtualenv/venvSOA
detected binary path: /usr/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3889
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8000 fd 4
spawned uWSGI http 1 (pid: 9755)
uwsgi socket 0 bound to TCP address 127.0.0.1:40940 (port auto-assigned) fd 3
Python version: 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x83dda0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72768 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x83dda0 pid: 9754 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 9754, cores: 1)
[pid: 9754|app: 0|req: 1/1] 183.14.18.84 () {38 vars in 689 bytes} [Tue Nov 28 22:40:54 2017] GET / => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (0 switches on core 0)

你可能感兴趣的:(nginx+uwsgi+django的搭建笔记)