EC2 ubuntu 12.04 nginx uwsgi mysql

sudo passwd
su
apt-get update
apt-get upgrade
apt-get install python-dev bulid-...... mysql-server ... .. nginx .. uwsgi ..
# install pip ..!
# rc
sudo vim /etc/rc.local
>>>>> add >>>
sudo uwsgi -i /etc/uwsgi/apps-enabled/unlock.ini &
>>> :q >>>
# uwsgi
sudo uwsgi -i /etc/uwsgi/apps-enabled/unlock.ini
>>>>> add >>>
[uwsgi]
socket = 127.0.0.1:9901
limit-as = 256
processes= 4
max-request=2000
enable-threads=true
base = /home/ubuntu/unlock
pythonpath = /home/ubuntu/unlock
chdir = /home/ubuntu/unlock
wsgi-file = index.py
>>> :q >>>
# nginx
sudo vim /etc/nginx/sites-enabled/default
>>>>>>> edit >>>
server {
        listen 80;
        server_name 54.214.18.209;
        access_log /var/log/nginx_access.log;
        error_log /var/log/nginx_error.log;
        location /static {
                root /home/ubuntu/unlock;
        }
        location / {
                include uwsgi_params;
                uwsgi_pass 127.0.0.1:9901;
                uwsgi_param UWSGI_CHDIR /home/ubuntu/unlock;
                uwsgi_param UWSGI_SCRIPT main;
                uwsgi_read_timeout 1800;
        }
}
>>>> :q >>>


发布了57 篇原创文章 · 获赞 13 · 访问量 7万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览