CSS и JS не обнаруживаются nginx - сервер отвечает со статусом 404 - PullRequest
0 голосов
/ 14 февраля 2020

это мой nginx .conf. CSS и JS находятся в этой папке

/usr/share/nginx/static/css
/usr/share/nginx/static/js
/usr/share/nginx/static/media

location ~ (css|js|img) {
  root /usr/share/nginx/html;
  try_files $uri $uri/ =404;
}

location / {

  root /usr/share/nginx/html;
}

но я получаю эту ошибку

Failed to load resource: the server responded with a status of 404 (Not Found)                               2.0fe3a37f.chunk.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               2.0a7ada56.chunk.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               main.e5e7c1e6.chunk.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               main.8a3eed81.chunk.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               2.0a7ada56.chunk.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               main.8a3eed81.chunk.js:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               2.0fe3a37f.chunk.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               main.e5e7c1e6.chunk.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found)                               main.e5e7c1e6.chunk.css:1
...