Bootstrap

linux uwsgi 非root,只能以root身份运行uwsgi 转载

我准备将nginx/uwsgi与烧瓶用于我正在开发的网站,但我遇到了问题。注意网站本身运行良好使用烧瓶的调试:5000端口,但我想现在投入生产。解释我做了什么。只能以root身份运行uwsgi

这是一个的Linode的Ubuntu 12.04LTS服务器,我安装了它这样的:

# install nginx

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:nginx/stable

sudo apt-get update

sudo apt-get upgrade --show-upgraded

sudo apt-get install nginx-full

# installing uwsgi

sudo apt-get install build-essential python-dev libxml2-dev

sudo apt-get install libc6 libexpat1 libgd2-xpm libgeoip1 libpam0g libpcre3 libssl1.0.0 libxml2 libxslt1.1 zlib1g

sudo pip install uwsgi

# python basics

sudo apt-get install python-pip build-essential python-dev

sudo pip install virtualenv

sudo pip install virtualenvwrapper

sudo mkdir -p /srv/www/li/

cd /srv/www/li/

virtualenv venv

source /srv/www/li/venv/bin/activate

pip install flask

然后我开始配置一切,但我已经运行到与uwsgi麻烦(没关系NGINX,这将是。下一步

sudo nano /etc/uwsgi/apps-available/li.xml

python

/run/uwsgi/app/li.socket

666

/srv/www/li

/srv/www/li

/srv/www/li/venv

li

/srv/www/li/li.py

app

4

60

8

1

/tmp/stats.socket

2000

512

256

192

sudo ln -s /etc/uwsgi/apps-available/li.xml /etc/uwsgi/apps-enabled/li.xml

但是,如果我运行它,我得到:

uwsgi --xml /etc/uwsgi/apps-enabled/li.xml

[uWSGI] parsing config file /etc/uwsgi/apps-enabled/li.xml

open("./python_plugin.so"): No such file or directory [core/utils.c line 4755]

!!! UNABLE to loa

;