Server reporting incorrect mime type for css files
- by Becky
We have a VPS server that we host our websites on. I have written a CMS using CodeIgniter. On one of the interfaces, I am attempting to upload a css file to the system. This worked correctly when we had it hosted on shared hosting. Since we've moved it to the VPS, I am getting an "incorrect filetype" error.
It all comes down to the fact that the server is reporting a mime type of text/x-c for the css file rather than text/css.
I logged in via shell and ran the following command on an existing valid css file (to make sure it wasn't an issue with either CodeIgniter or with php).
file --brief --mime 'filename.css' 2>&1
The server gave me the following in response to my command:
text/x-c; charset=us-ascii
My question ... is there some sort of server setting that I need to tweak to get the server to correctly identify the css file as text/css?
Do I just have to add a mime type for the css files to the server? I found the mime types file (etc/mime.types), and it just hase video types and a couple other that I have no idea what they are. There is nothing in there for css or images or html files. Unless I'm looking in the wrong spot.
I'm not a server person, so I'm hoping someone can help me out.
Some server specs:
Apache/2.2.22 (Unix)
php 5.3.13
Server API = CGI/FastCGI
the fileinfo php extension appears to be disabled