Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Files showing up with type text/plain

Tags:

css

jekyll

I am attempting to serve my static blog (powered by jekyll) on my Ubuntu server but the CSS does not apply and I keep getting the issue:

"Resource interpreted as Stylesheet but transferred with MIME type text/plain". 

In the source code, however, I explicitly list that these files are "text/css". Any ideas on how to solve this?

like image 238
Julian25 Avatar asked Oct 06 '13 20:10

Julian25


People also ask

Are CSS files plain text?

Like HTML files, CSS files are also plain text, and usually have a . css file extension. An example of a CSS file name style.

What is the default CSS file?

The default. css file is the first CSS file to be loaded when your browser loads a DotNetNuke webpage. This file controls all the fundamental styles of every html element and lays the foundation for what skins can be built off of.

How to link my CSS file to HTML?

CSS can be added to HTML documents in 3 ways: Inline - by using the style attribute inside HTML elements. Internal - by using a <style> element in the <head> section. External - by using a <link> element to link to an external CSS file.


1 Answers

This was an Nginx issue. I needed to place

include /etc/nginx/mime.types;

in the "location /" block.

like image 198
Julian25 Avatar answered Oct 18 '22 18:10

Julian25