Serve .json as content type application/json with Apache on Ubuntu
16/11/2010If you are using Ubuntu 10.04 or Debian and you serve .json files through Apache, you might want to serve the files with the correct content type. I am doing this primarily because I want to use the Firefox extension JSONView
The Apache module mod_mine will help to do this easily. However, with Ubuntu you need to edit the file /etc/mime.types and add the line
application/json json
Then restart Apache
sudo /etc/init.d/apache2 restart
There are 2 comments in this article: