用的是python虚拟空间,静态文件已经收集,网页没有样式
来源:8-6 Django Nginx+uWSGI部署
mfloat流风
2020-02-24
error.lgo文件:
2020/02/24 20:30:02 [notice] 24627#0: signal process started
2020/02/24 20:41:47 [notice] 26638#0: signal process started
2020/02/24 21:13:52 [notice] 31246#0: signal process started
nginx.conf配置:
access_log /var/log/nginx/nginx-uwsgi.log;
location / {
proxy_pass http://uwsgi;
}
location /static1 {
alias /home/python/django_project/django_mall/static1;
}
location /static {
alias /home/python/django_project/django_mall/static;
}
}
}
django项目下:static ,static1权限均设置为777
网页无样式[python@VM_0_14_centos django_project]$ cd django_mall/
[python@VM_0_14_centos django_mall]$ ls
accounts django_uwsgi.ini mall.sql mine pycache static1 utils
db.sqlite3 log manage.py pack.txt readme.txt system
django_mall mall medias pid static templates
[python@VM_0_14_centos django_mall]$ pwd
/home/python/django_project/django_mall
[python@VM_0_14_centos django_mall]$
1回答
-
咚咚呛
2020-02-24
检查一下配置是否有 STATIC_URL 的配置
Nginx应该有异常log的,你提供的日志没有用,找找还有没有相关的日志,好定位问题。
0222020-02-26
相似问题