django -- uwsgi+nginx部署
一、 安装nginx How To Install Nginx on CentOS 7 添加epel扩展仓 sudo yum install epel-release 安装Nginx yum install nginx 开启Nginx sudo systemctl start nginx 如果防火墙拦截,可用下面的命令 sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --reload 浏览器打开 http://your_ip/ , 出现Welcome to nginx!说明安装成功 开机启动项 systemclt enable nginx 服务器默认的根目录 /usr/share/nginx/html , 服务器配置目录 /etc/nginx/conf.d/ ,文件要以 .conf 结尾. 全局配置文件 /etc/nginx/nginx.conf 二、安装 uwsgi pip install uwsgi # 测试uwsgi 如:./Projects/Project/wsgi.py cd Projects uwsgi --http :8000 -