Articles of uwsgi

使用现有的apache设置服务器上的nginx + uwsgi

我有一个现有的服务器运行一个域使用Apache。 (PHP) 现在,我们有另一个域,我们试图运行在同一台服务器上,我们想用nginx和uwsgi(python)来运行。 我也应该从virtualenv运行这个python项目? 这甚至有可能吗? 端口80已被Apache使用。 试图把我的头围绕着这一切。 谢谢! T恤

502坏的网关 – nginx,uwsgi + django在不同的docker集装箱

我有点困难,确定为什么nginx和uwsgi没有为我的django应用程序服务。 这是来自nginx日志的问题。 nginx-01: 2015/12/06 07:47:50 [error] 10#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://0.0.0.0:8001", host: "54.252.197.191" 因此,uwsgi和django使用以下文件设置驻留在一个容器中。 [uwsgi] http-socket = :8001 chdir = %dsrc/myproject/ env = DJANGO_SETTINGS_MODULE=myproject.settings module = myproject.wsgi:application master = true processes = 4 我的docker文件启动uwsgi和我公开端口8001到主机 CMD ["uwsgi", "uwsgi.ini"] 我的第二个容器是nginx有以下nginx虚拟主机设置。 upstream […]

如何在uWSGI中configurationSSL / TLS协议的白名单?

我可以使用https = =0,x.crt,x.key,<ciphers>指定一个https = =0,x.crt,x.key,<ciphers> 。 相关文档在这里: http : //uwsgi-docs.readthedocs.org/en/latest/HTTPS.html#setting-ssl–tls-ciphers 但是,还有一种方法可以指定允许哪些SSL / TLS协议? 我想要禁用SSLv2和SSLv3。

我需要uWSGI的应用程序或Nginix将足够?

根据官方uWSGI文档:networking服务器面向外部世界。 它可以直接从文件系统提供文件(HTML,图像,CSS等)。 但是,它不能直接与Django应用程序进行对话; 它需要运行应用程序的东西,从Web客户端(如浏览器)提供请求并返回响应。 Web服务器网关接口 – WSGI – 完成这项工作。 WSGI是一个Python标准。uWSGI是一个WSGI实现。 这是否意味着如果我想在Web服务器上部署一个Django应用程序,uWSGI是必须的?

nginx连接套接字失败没有文件或目录与Django和uwsgi

我正在尝试使用本教程: Digital Ocean,使用nginx和uwsgi部署一个djangonetworking应用程序。 我按照教程一步一步,这些是我的configuration文件: /etc/uwsgi/sites/picknbox.ini: [uwsgi] project = picknbox # Virtual environment name in home directory base = /home/picknbox # Home directory path chdir = /home/picknbox/picknbox/picknbox # Virtual Env Directory home = /home/picknbox/picknbox #Django Project Directory with manage.py$ module = picknbox.wsgi:application # project name master = true processes = 5 socket = /home/picknbox/picknbox/picknbox/picknbox.sock chmod-socket = […]

Nginx无法将stream量传递给Flask应用程序和uwsgi

我想用Nginx部署一个Flask和uwsgi应用程序,一切正常,我可以让我的应用程序在我的域上工作: test.example.com:8080 : test.example.com:8080 。 问题是我不能使其在默认端口80下工作,当我尝试浏览test.example.com时,从Nginx中获得以下错误消息: 2016/09/02 10:21:29 [error] 2947#2947: *3 no live upstreams while connecting to upstream, client: 75.xxx.xxx.136, server: test.example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://localhost", host: "test.example.com", referrer: "http://test.example.com/" 这是我的uwsgi命令: uwsgi –socket 8080 –chdir /var/www/test.example.com –protocol=http –module myapp:app 这是我的Nginxconfiguration: server { listen 80; root /var/www/test.example.com; server_name test.example.com; location / { include uwsgi_params; […]

基本的NGINX,本地运行的uWSGIconfiguration只提供404

我的Flask应用程序通过uWSGI运行,我正在使用TCP套接字与NGINX交谈。 configuration是非常基本的: application.conf server { listen 80 default_server; location / { uwsgi_pass 127.0.0.1:9000; include uwsgi_params; } } 我在.ini中指定了TCP套接字: uwsgi.ini [uwsgi] socket = 127.0.0.1:9000 # remove the socket once disconnected vacuum = true module = wsgi callable = app processes = 4 threads = 2 master = 1 和我的模块: wsgi.py from app import create_app app = […]

uwsgi错误 – connect()unix:/home/user/www/www.sock失败

我很困惑。 我犯错的地方? 项目文件位置: /home/username/www /etc/uwsgi/sites/mysite.com [uwsgi] project = www base = /home/username uid = www-data gid = www-data chdir = %(base)/%(project) home = %(base)/.virtualenvs/%(project) module = %(project).wsgi:application master = true processes = 5 socket = %(base)/%(project)/%(project).sock chmod-socket = 664 vacuum = true /etc/init/uwsgi.conf: description "uWSGI application server in Emperor mode" start on runlevel [2345] stop […]

godaddy dns + aliyun主机 – django应用程序,uwsgi,nginx – 显示“502坏门户”

我有godaddy域mydomain.me我把它指向我在阿里云ECS的IP 在我的diango设置中我有: ALLOWED_HOSTS = [".mydomain.me","xxxx"] 在/ etc / nginx / sites-avaiable / Django我有 upstream django { server unix:/tmp/uwsgi.sock; } server { listen xxxx:80; server_name .mydomain.me; location /static/ { include uwsgi_params; alias /root/DjangoApps/mydomain_me/public; } location / { include uwsgi_params; uwsgi_pass django; } } **编辑:**为此,我制作了符号链接/ etc / nginx / sites-enabled / Django,并删除了默认的符号链接。 在uwsgi.ini我有 [uwsgi] chdir = /root/DjangoApps/mydomain_me […]

脚本(bash)自动启动/重新启动nginx(如果失败)

有人可以帮我在我的机器上安装nginx吗? 我编译它(我用它来运行使用uwsgi_rs的Django应用程序)。 它运行正常,但我必须手动启动它。 我如何设置它来自动运行? 如果它被杀死了,再次启动(自动)? 我在说nginx和uwsgi …