你好,我有问题,我的DjangoReact项目..我有403错误的静态文件(js,css).. Error 403 NGINX Django
配置-〉
server {
server_name thewatchesmania.com www.thewatchesmania.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/user/pyapps/The-Watches-Mania/static;
}
location /media/ {
root /home/user/pyapps/The-Watches-Mania;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
1条答案
按热度按时间5us2dqdw1#
如果您的静态文件夹位于项目文件夹的根目录中,我认为nginx.conf上的静态位置应该是:
或者,如果它在您的主应用程序中,它将像这样: