I’ve deployed my django project “django_chatbot” on an ubuntu server on Digitalocean. the user is “aras”, and the project folder is:
“/home/aras/django_chatbot”
my static files do not load on the website.
My nginx log is:
[error] 32978#32978: *350 open() "/var/www/my_project/static/historypage.js" failed (2: No such file or directory), client: 185.180.140.141, server: 64.227.102.100, request: "GET /static/historypage.js HTTP/1.1", host: "64.227.102.100"
2023/08/29 04:09:07 [notice] 42213#42213: signal process started
2023/08/29 04:43:23 [notice] 42607#42607: signal process started
2023/08/29 04:43:23 [notice] 42613#42613: signal process started
2023/08/29 04:43:23 [notice] 42618#42618: signal process started
2023/08/29 04:43:23 [notice] 42624#42624: signal process started
2023/08/29 06:45:24 [notice] 43969#43969: signal process started
2023/08/29 06:57:16 [notice] 44086#44086: signal process started
Did you run collectstatic to copy the files there?
Yes,
Does nginx have the appropriate access to those directories and files?
I’ve prepared nginx access for the “static” folder at: /var/www/my_project/static/
but not for the sub folders and files within that.
It it necessary?
In the nginx log, I wonder about historypage.js failure to load. because i do not have such file in my static folder of my app. And the log does not cover other failure of logo and fonts.
What about your error log? (Note, it may be helpful to filter your logs by only displaying lines with your ip address to screen out all the bot traffic.)