ara on 2011年10月24日 17:23 #

按您文章进行了配置,出现错误,请教问题原因

nginx.conf 配置:

server { # python/uwsgi

listen 80;

root /home/chenkai/webpytest;

error_log /home/chenkai/webpytest/nginx.log;

location / {

include uwsgi_params;

uwsgi_pass 127.0.0.1:9090;

index index.html index.htm;

}

}

index.py内容:

import web

urls=('/(.*)','hello')

class hello:

def GET(self):

return 'Hello,world!'

app=web.application(urls,globals())

application=app.wsgifunc()

用uwsgi -s 127.0.0.1:9090 -w index -d uws.error启动

出现错误uws.error:

*** Starting uWSGI 1.0-dev (32bit) on [Mon Oct 24 17:13:38 2011] ***

compiled with version: 4.6.1 on 24 October 2011 16:31:58

current working directory: /home/chenkai/webpytest

detected binary path: /usr/local/bin/uwsgi

*** WARNING: you are running uWSGI without its master process manager ***

your memory page size is 4096 bytes

uwsgi socket 0 bound to TCP address 127.0.0.1:9090 fd 4

Python version: 2.7.2+ (default, Oct 4 2011, 20:29:37) [GCC 4.6.1]

Python main interpreter initialized at 0x91c9b78

your server socket listen backlog is limited to 100 connections

*** Operational MODE: single process ***

WSGI application 0 (mountpoint='') ready on interpreter 0x91c9b78 pid: 3717 (default app)

*** uWSGI is running in multiple interpreter mode ***

spawned uWSGI worker 1 (and the only) (pid: 3717, cores: 1)

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/web/application.py", line 237, in process

return self.handle()

File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/web/application.py", line 228, in handle

return self._delegate(fn, self.fvars, args)

File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/web/application.py", line 409, in _delegate

return handle_class(cls)

File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/web/application.py", line 385, in handle_class

return tocall(*args)

TypeError: GET() takes exactly 1 argument (2 given)

[pid: 3717|app: 0|req: 1/1] 60.55.159.142 () {40 vars in 638 bytes} [Mon Oct 24 17:13:46 2011] GET / => generated 30432 bytes in 81 msecs (HTTP/1.1 500) 1 headers in 63 bytes (2 switches on core 0)

linux部署python web项目 详细_linux下nginx+python+uwsgi部署总结(django+web.py)相关推荐

  1. linux python连接oracle数据库_Linux下通过python访问MySQL、Oracle、SQL Server数据库的方法...

    本文档主要描述了Linux下python数据库驱动的安装和配置,用来实现在Linux平台下通过python访问MySQL.Oracle.SQL Server数据库. 其中包括以下几个软件的安装及配置: ...

  2. python获取终端输出流_Linux下用Python获取命令行输出的几个方案

    Python在慢慢成为脑影像数据处理中的主流语言.而在做脑影像处理时,不免有时候需要用到一些别人开发好的工具包,而这些包并不都是python包.下面是学习啦小编收集整理的Linux下用Python获取 ...

  3. linux python自动补全_Linux下在python命令行中自动补全代码(py2、3,centos、ubuntu)...

    每次只在shell中测试少量代码,纯手打也有点麻烦 安装ipython也可以实现这个功能,不过破机子有时候反映会稍微卡顿,比较麻烦 1.不管有没有这个文件,直接打开这个文件 vi ~/.pystart ...

  4. linux下nginx+python+fastcgi部署总结(web.py版)

    2019独角兽企业重金招聘Python工程师标准>>> 在上一篇文章linux下nginx+python+fastcgi部署总结(django版)中,我们部署了nginx+djang ...

  5. Tomcat手动部署Web项目详细步骤

    阅读须知:文章基于Tomcat8,其它版本若有差异,请自行辨别.本文为博主原创文章,转载请附原文链接. 不借助任何IDE,这里介绍在Tomcat中手动部署web项目的三种方式: 1.部署解包的weba ...

  6. spring mvc项目在IDEA下使用jrebel热部署报错!!

    转载:https://segmentfault.com/q/1010000006068898 spring mvc项目在IDEA下使用jrebel热部署报错!! 25-Jul-2016 20:43:4 ...

  7. 多个vue项目生产环境下NGINX配置文件

    多个vue项目生产环境下NGINX配置文件 使用场景 1.多个前端项目 2.多个后端项目 3.修改nginx配置后端接口转发路径 4.反向代理 某个目录下 带特定后缀名的文件 5.vue3项目 使用前 ...

  8. linux python3.8源码安装_linux 下从源码安装 Python——小白踩坑记

    实验室服务器使用的系统为 Ubuntu 16.04,自带的 python 版本为 Python 2.7.12 和 Python 3.5.2,命令行下使用$ python命令来启动 python 时默认 ...

  9. linux python版本_linux下更新Python版本并修改默认版本

    linux下更新Python版本并修改默认版本,有需要的朋友可以参考下. 很多情况下拿到的服务器python版本很低,需要自己动手更改默认python版本 1.从官网下载python安装包(这个版本可 ...

最新文章

  1. 数据科学中必须知道的5个关于奇异值分解(SVD)的应用
  2. php读取西门子plc_简单说一些PLC中模拟量的相关概念
  3. java中对集合排序,Java如何对集合中的项目排序?
  4. 13.8.可视化虚拟机工具--Jconsole内存监控、13.9.可视化虚拟机工具--Jconsole线程监控、13.10.死锁原理以及可视化虚拟机工具--Jconsole线程
  5. 基于.net的分布式系统限流组件
  6. Ubuntu 中Eclipse 默认的OpenJDK 和 SUNJDK问题总结
  7. mplayer1.3.0交叉编译
  8. Python | Lambda函数与示例
  9. 精通webpack的5大关键点
  10. 为Eclipse安装功能扩展插件
  11. Asp.net MVC4 与 Web Form 并存
  12. 面试官问我:如何在 Python 中解析和修改 XML
  13. 【Spring Cloud】微服务和Spring Cloud
  14. 美国企业开发新型锂硅电池,将使手机电量增加30%以上
  15. 51单片机最小系统的c语言,89c51单片机最小系统,89c51最小系统原理图的功能详解...
  16. Unity Json存档读档操作
  17. python函数返回值可以有多个吗_Python函数中如何返回多个值?(代码示例)
  18. 抽象类 模板设计模式
  19. 仿小米天气预报未来几天趋势预报折线图
  20. 人工智能在项目管理中具有哪些优势?

热门文章

  1. BZOJ 2287 POJ Challenge 消失之物
  2. 论文阅读(XiangBai——【AAAI2017】TextBoxes_A Fast Text Detector with a Single Deep Neural Network)...
  3. Xshell远程管理Linux
  4. 关于iOS 'The sandbox is not sync with the Podfile.lock'问题解决方法
  5. ccpc中国大学生首届程序设计竞赛
  6. DOCKER功能练习
  7. 【转】boost 库后缀名
  8. 网站缓存数据实时更新的实现
  9. [转]PCM文件格式
  10. c语言打程序时会遇到什么问题,Sublime text3 实现C语言编译运行以及过程中可能遇到的问题...