Nginx не загружает файлы CSS и JS (ошибка типа MIME)?CSS

Разбираемся в CSS
Ответить
Anonymous
 Nginx не загружает файлы CSS и JS (ошибка типа MIME)?

Сообщение Anonymous »

Я получаю следующие ошибки на моем веб -сайте: < /p>

Код: Выделить всё

Error: There are multiple templates named 'velvet'. Each template needs a unique name. 1b1a247fc034d5089f331ec9540138ff6afd5f39.js:75:306
The stylesheet http://webmill.eu/css/bootstrap.min.css was not loaded because its MIME type, "text/html", is not "text/css". webmill.eu
The stylesheet http://webmill.eu/css/font-awesome.min.css was not loaded because its MIME type, "text/html", is not "text/css". webmill.eu
The stylesheet http://webmill.eu/css/velvet.css was not loaded because its MIME type, "text/html", is not "text/css". webmill.eu
The stylesheet http://webmill.eu/css/custom.css was not loaded because its MIME type, "text/html", is not "text/css".
After extensive research on the 4 CSS stylesheets failing to load I followed some leads and attempted to fix it by making changes in my nginx file ( /


etc/nginx/sites-available/webmill


) вставка "include /etc/nginx/mime.types;" под расположением /{: < /p>

Код: Выделить всё

# HTTP
server {
listen 80 default_server; # if this is not a default server, remove "default_server"
listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html; # root is irrelevant
index index.html index.htm; # this is also irrelevant

server_name webmill.eu; # the domain on which we want to host the application. Since we set "default_server" previously, nginx will answer all hosts anyway.

# If your application is not compatible with IE 

Я должен делать что -то не так, потому что это все еще не работает.   Должен ли я также включить «[b] root/usr/share/nginx/html; [/b]» в разделе   [b]/etc/nginx/sites-vailable/webmill [/b]?> 

Подробнее здесь: [url]https://stackoverflow.com/questions/29573489/nginx-failing-to-load-css-and-js-files-mime-type-error[/url]
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»