0

Getting 404 for /static/js/admin-extra.js but not for other files, like /static/admin/js/core.js

All static files are copied by Django to the static file directory from both my app, and third party apps. My files are the ones that give 404.

checked permissions (for debugging ran as root):

-rw-r--r--. 1 root root 1617 Apr 5 12:46 admin-extra.js

-rw-r--r--. 1 root root 1617 Apr 5 12:46 core.js

both files are identical. As far as I understand.

Logs for erroring files:

webserver_1  | 2019/04/05 11:59:59 [error] 7#7: *13 open() "/srv/static-files/js/admin-extra.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: localhost, request: "GET /static/js/admin-extra.js HTTP/1.1", host: "xx.xx.xx.xx"
webserver_1  | xx.xx.xx.xx - - [05/Apr/2019:11:59:59 +0000] "GET /static/js/admin-extra.js HTTP/1.1" 404 548 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"

Logs for normal files:

webserver_1  | xx.xx.xx.xx - - [05/Apr/2019:12:14:35 +0000] "GET /static/admin/css/base.css HTTP/1.1" 200 16378 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"

Thanks in advance.

2
  • 1
    What does your nginx configuration for that site look like?
    – Seth
    Commented Apr 5, 2019 at 12:35
  • 1
    Can you please add the file and directory hierarchy and structure into your question?
    – Fanatique
    Commented Apr 5, 2019 at 13:12

1 Answer 1

0

My bad. I was checking the App container, but should have checked Nginx container. Problem was solved by properly describing volumes in docker-compose.yml Thanks for the comments.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .