踩坑指南
-
uwsgi --http :8000 --module mysite.wsgi
不在虚拟环境中运行
指定虚拟环境路径。 -H /venv -
Too many levels of symbolic links
的问题
sudo ln -s 绝对路径 绝对路径 -
ModuleNotFoundError: No module named 'django'
项目不在虚拟环境中启动
nginx部分代码location / { include uwsgi_params; uwsgi_pass ip:port; uwsgi_param UWSGI_SCRIPT mysite.wsgi; uwsgi_param UWSGI_PYHOME venv path; uwsgi_param UWSGI_CHDIR project path; index index.html index.htm; client_max_body_size 35m; }
uwsgi部分代码
在这里插入代码片 [uwsgi] socket = 127.0.0.1:8001 master = true //主进程 vhost = true //多站模式 no-site = true //多站模式时不设置入口模块和文件 workers = 2 //子进程数 reload-mercy = 10 vacuum = true //退出、重启时清理文件 max-requests = 1000 limit-as = 512 buffer-size = 30000 home = venv path daemonize = project_PATH/uwsgi.log
-
Nginx + SSL(阿里云)
-
Nginx POST 跳转 GET
客户端进行post请求时没有使用https而是http
-CentOS 安装 Nginx
参考:https://blog.youkuaiyun.com/qq_32953079/article/details/81975160