Articles of uwsgi

Django / uWSGI – 给出502状态码的Nginx:error.log表示“权限被拒绝”

我试图设置我的Django应用程序使用uWSGI和Nginx。 我正在学习这个教程: http : //uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html 我在“使用Unix套接字而不是端口”步骤。 我试过了 uwsgi –socket mysite.sock –wsgi-file test.py 但它没有工作(作为教程怀疑)。 我在看 /var/log/nginx/error.log 它说 2015/05/11 00:20:17 [crit] 1964#0: *13 connect() to unix:///home/a/Documents/CMS/CMS.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: 192.168.174.131, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/a/Documents/CMS/CMS.sock:", host: "127.0.0.1:8000" 当我做 uwsgi –socket mysite.sock –wsgi-file test.py –chmod-socket=666 它工作,但是当我这样做 uwsgi –socket mysite.sock […]

没有模块命名为OS – NGINX / UWSGI / NGINX

看了很多相关的post,大部分都指向了一个过时的版本的python,在uwsgi启动过程中导致了'no module named os'。 我跑了 print sys.version_info 它显示了Python 2.7,所有其他来源说,这是足够新的。 我的.ini文件看起来像: [uwsgi] chdir = app/app/ module = wsgi.py:application no-site = true virtualenv = app_venv master = true processes = 10 socket = app.sock chmod-socket = 777 vacuum = true die-on-term = true 而当我运行: uwsgi –ini app.ini 我懂了: Traceback (most recent call last): File "./wsgi.py", line 10, […]

Nginx的 – 如何授权使用Python脚本访问存储库

我已经build立了一个使用Nginx的本地Git服务器(在Ubuntu中),现在我想授权用户使用外部的Python脚本,这应该授权他们对预定义的数据库。 AFAIK,我必须使用uwsgi链接Python脚本与Nginx,但是没有例子显示我应该如何实现这一点。 任何帮助?

uWSGI忽略了uid,gid和chown-socket

我试图用nginx来使用uWSGI。 我遇到的根本问题是,我从nginx尝试连接到uWSGI套接字文件中得到“没有这样的文件或目录”。 当我使用下面的设置时,我期待套接字文件的权限改变。 但是,他们不是。 它继续显示uwsgi:uwsgi 。 nginx的错误是*17 connect() to unix:/tmp/myapp.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.122, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/tmp/myapp.sock:", host: "192.168.1.123:81" myapp.ini(uwsgi) [uwsgi] chdir = /var/local/myapp plugins = python module = wsgi:app home = /var/local/virtualenv/myapp file = main.py daemonize = /var/log/uwsgi/myapp.log pidfile = […]

内部服务器错误与Nginx和uWSGI

我试图在Linode.com上使用Nginx的应用程序,但是我很早就被uWSGIconfiguration卡住了。 我已经使用了“入门”指南和“在Ubuntu 12.04(精准穿山甲)上使用uWSGI和nginx的WSGI”指南,并成功部署了Nginx(在浏览器中有Nginx的欢迎消息)。 尽pipe上面的教程是针对Ubuntu 12.04的,但我已经使用了14.04。 当我到达uWSGIconfiguration和“Hello World”Python应用程序时,问题就开始了。 到location /在浏览器返回Failed to load resource: the server responded with a status of 500 (Internal Server Error)并没有任何logging在服务器error.log。 location /static工作虽然和服务文件顺利。 我已经尝试了很多东西,并且广泛地在Google和Stackoverflow上进行了修复,但没有任何结果,现在我感到很沮丧。 感谢您的任何帮助。 这里是我的configuration文件(我已经隐藏我的域名和IP): /etc/hosts 127.0.0.1 localhost 127.0.1.1 ubuntu XX.XX.XX.XXX mars # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters /etc/nginx/sites-enabled/example.com server […]

没有收到来自机器本地服务器的任何回应

所以我已经使用NGIX与docker和许多应用程序django与UWSGI服务器Linux。 所以我需要创build一个在Docker容器内执行的工作。 这个工作将做一个应用程序Django的一些url的请求。 但是,当我试图提出请求时,我没有收到任何回应。 命令 wget localhost:3031 –bind-address=127.0.0.1 响应: –2015-09-23 14:20:15– http://localhost:3031/ Resolving localhost (localhost)… ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:3031… failed: Invalid argument. Connecting to localhost (localhost)|127.0.0.1|:3031… connected. HTTP request sent, awaiting response… No data received. Retrying. –2015-09-23 14:20:16– (try: 2) http://localhost:3031/ Connecting to localhost (localhost)|127.0.0.1|:3031… connected. HTTP request sent, awaiting response… No data […]

不能在debian wheezy中启动systemd

我正在使用Debian Wheezy 7.8,并且想要启动uwsgi作为服务。 我安装了systemd( apt-get install systemd ),并编辑了grub( vim /etc/default/grub )并更新了这一行: GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd" 我更新了grub并重新启动了系统。 但是,当我给这个: systemctl 我得到这个: Failed to get D-Bus connection: No connection to service manager. 当我给ps aux我得到这个: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 10648 808 ? Ss 07:06 0:00 init [2] PID 1不应该被系统化吗? 我究竟做错了什么?

Postgresql错误:无法从客户端接收数据:连接重置由对等

我试试这个栈:nginx + uwsgi + django + postgresql,请求可以到达django的视图,客户端显示500 server internal fault ,我查了postgres日志,发现错误could not receive data from client: Connection reset by peer 。 如何debugging呢?

uWSGI统计中每个字段的含义

正如官方文档所说,uWSGI允许我们通过JSON格式获取统计数据,如下所示: { "version":"2.0.12", "listen_queue":0, "listen_queue_errors":0, "signal_queue":0, "load":0, "pid":1, "uid":1000, "gid":0, "cwd":"/regent", "locks":[ { "user 0":0 }, { "signal":0 }, { "filemon":0 }, { "timer":0 }, { "rbtimer":0 }, { "cron":0 }, { "rpc":0 }, { "snmp":0 } ], "sockets":[ { "name":"127.0.0.1:36577", "proto":"uwsgi", "queue":0, "max_queue":100, "shared":0, "can_offload":0 } ], "workers":[ { "id":1, "pid":9, "accepting":1, "requests":0, "delta_requests":0, […]

开始:作业无法启动UWSGI,

试图configurationubuntu + nginx + uwsgi + django 新贵脚本/etc/init/uwsgi.conf description "uWSGI application server in Emperor mode" start on runlevel [2345] stop on runlevel [!2345] setuid voxa setgid www-data exec /usr/local/bin/uwsgi –emperor /etc/uwsgi/sites uwsgiconfiguration [uwsgi] project = project base = /home/user chdir = %(base)/%(project) home = home/user/Env/project_env module = %(project).wsgi:application master = true processes = 5 socket […]