安装nginx python uwsgi环境 以及模拟测试
uwsgi帮助文档:
http://uwsgi-docs-cn.readthedocs.io/zh_CN/latest/WSGIquickstart.html
http://uwsgi-docs.readthedocs.io/en/latest/Async.html
http://www.cnblogs.com/xiongpq/p/3381069.html
./configure: error: the HTTP rewrite module requires the PCRE library错误见下文
http://blog.csdn.net/hfsu0419/article/details/7190152
也可以参考廖雪峰的博客:
http://www.liaoxuefeng.com/article/001373892270040b645f6f886d94bdfbf57b8dd596f19b3000
uwsgi.ini中必须配置
py-autoreload = 1
否则程序修改不会生效,见文章:http://stackoverflow.com/questions/27813166/uwsgi-does-not-reload-after-changing-django-settings
手动命令启动uwsgi:
[root@crz_oa webserver]# uwsgi --http :9090 --wsgi-file home.py --daemonize /var/log/uwsgi.log
升级
[root@crz_oa webserver]# uwsgi --http :9090 --wsgi-file home.py --daemonize /var/log/uwsgi.log --master --harakiri 60 --socket-timeout 10
或者
[root@crz_oa webserver]# uwsgi -s 127.0.0.1:9090 --wsgi-file home.py --daemonize /var/log/uwsgi.log --master --harakiri 60 --socket-timeout 10
然后结合nginx通过socket接口调用
版本2 结合flask使用命令:
[root@crz_oa webserver]# uwsgi --http :9090 --wsgi-file home.py --daemonize /var/log/uwsgi.log --master --harakiri 60 --socket-timeout 10 -w home:app
参考http://docs.jinkan.org/docs/flask/deploying/uwsgi.html
如果出现错误:
uwsgi: option '--http' is ambiguous
换成这种写法
uwsgi --http-socket :9090 --wsgi-file home.py --daemonize /var/log/uwsgi.log --master --harakiri 60 --socket-timeout 10 -w home:app
囧,接着又出现错误:
uwsgi: unrecognized option '--wsgi-file'
sudo uwsgi --http-socket :9090 --plugin python --wsgi-file home.py --daemonize /var/log/uwsgi.log --master --harakiri 60 --socket-timeout 10 -w home:app
模拟测试可以去这个网站http://coolaf.com/,不仅可以模拟post提交,还可以添加各种cookie参数和header参数,以及各种代理:

安装nginx python uwsgi环境 以及模拟测试的更多相关文章
- centos6.5安装nginx+python+uwsgi+django
nginx+uwsgi+django环境部署及测试 默认系统自带的python2.6.6 第一步(安装setuptools) wget https://pypi.python.org/packages ...
- nginx+python+fastcgi环境配置(flup版本)
昨天花了一整天的时间研究搭建了nginx+python+fastcgi环境,并测试没问题,由于是第一次,并且参考了网上很多东西,网上也有很多,但还是把自己的过程记录下. 主要感谢这位兄弟的文章给了我很 ...
- Nginx+Python+uwsgi+Django的web开发环境安装及配置
Nginx+Python+uwsgi+Django的web开发环境安装及配置 nginx安装 nginx的安装这里就略过了... python安装 通常系统已经自带了,这里也略过 uwsgi安装 官网 ...
- 在阿里云服务器上配置CentOS+Nginx+Python+Flask环境
在阿里云服务器上配置CentOS+Nginx+Python+Flask环境 项目运行环境 阿里云(单核CPU, 1G内存, Ubuntu 14.04 x64 带宽1Mbps), 具体购买和ssh连接阿 ...
- 安装:python+webdriver环境
安装:python+webdriver环境第一步:安装active-python,双击可执行文件,直接默认安装即可.第二步:安装selenium webdriver1. 打开cmd2. 命令为:pip ...
- 安装nginx+lua开发环境
一.安装nginx及搭建本地测试环境 1.创建安装目录: /data/nginx2.安装make: yum-y install gcc automake autoconf libt ...
- linux+nginx+python+django环境配置
Django是一个开放源代码的Web应用框架,由Python写成,它最初是被开发来用于管理劳伦斯出版集团旗下的一些以新闻内容为主的网站的.python+django也是web开发者最受欢迎的框架.今天 ...
- linux下安装nginx+php+mysql环境 详细教程
话不多说上代码 linux环境:centos 7.0 64位 nginx:nginx-1.8.0.tar.gz php: php-7.1.1.tar.gz mysql: mysql-5.6.21.ta ...
- Windows下安装Nginx+php+mysql环境
系统:Windows 7 64位系统 安装之前,首先下载软件: Nginx: http://nginx.org/en/download.html PHP Stable PHP 5.6.26: http ...
随机推荐
- Lintcode: Sort Letters by Case
Given a string which contains only letters. Sort it by lower case first and upper case second. Note ...
- for 穷举、迭代 while循环
1.穷举: 把所有可能的情况都走一遍,使用if条件筛选出来满足条件的情况. 2.百鸡百钱:公鸡2文钱一只,母鸡1文钱一只,小鸡半文钱一只,总共只有100文钱,如何在凑够100只鸡的情况下刚好花完100 ...
- Mac 显示和隐藏 隐藏文件
控制台运行: //显示 defaults write com.apple.finder AppleShowAllFiles -bool true //隐藏 defaults write com.app ...
- web 前端:连接mysql中文乱码问题的解决办法
当使用tomcat部署servlet连接时,总是出现各种原因的中文乱码问题.有的是因为mysql的默认字符集的问题,有的是客户端的字符配置问题. 现在对于这两种问题进行配置,来解决乱码. 服务器端(m ...
- application 统计网站访问人数
参考书<JSP Web 开发案例教程> index.jsp welcome.jsp 显示
- URAL 1876 Centipede's Morning(数学)
A centipede has 40 left feet and 40 right feet. It keeps a left slippers and b right slippers under ...
- .net 网站预编译命令
aspnet_compiler -v /Aspnet -p "C:\inetpub\wwwroot\a" C:\inetpub\wwwroot\a2 /Aspnet iis ...
- demo16Toast
/Users/alamps/AndroidStudioProjects/demo16Toast/demo16Toast/src/main/res/layout/activity_main.xml &l ...
- Listview和Gridview自定义分割线
1,ListView和GridView中的每一个条目都有分割线,属性android:footerDividersEnabled表示是否显示分割线,默认是为true,即可见.可以自定义的设置分割线的颜色 ...
- NOIP201205Vigenère密码
NOIP201205Vigenère密码 [问题描述] 16 世纪法国外交家Blaise de Vigenère设计了一种多表密码加密 ...