ubuntu+web.py+fastcgi+nginx
2016-01-22 00:00
579 查看
安装环境
配置web.py
配置nginx
启动web.py
启动nginx
add-apt-repository ppa:stevecrozz/ppa apt-get update apt-get install uwsgi
配置web.py
app = web.application(urls, globals()) application = app.wsgifunc()
配置nginx
server { listen 80; server_name localhost; ... location / { include uwsgi_params; uwsgi_pass 127.0.0.1:9090; } location /static/ { root D:\Projects\PYTHON\webpy\nginxdemo; if (-f $request_filename) { rewrite ^/static/(.*)$ /static/$1 break; } } ... }
启动web.py
uwsgi -s :9090 -w myapp -p 4 #并发4个线程:
启动nginx
> service nginx start > service nginx stop > service nginx reload
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- nginx代理指定目录
- 使用BAE的基于Web.py的简单博客程序
- ubuntu下chrome无法同步问题解决
- 访问Nginx发生SSL connection error的一种情况
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- Nginx+Naxsi部署专业级Web应用防火墙
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- CentOS 6.2实战部署Nginx+MySQL+PHP
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试