Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I have:

# ...
http {
  include mime.types;
  # ...
  types {
  }
}
# ...

will the second types overwrite the types in the include or append to the mime types?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

it will overwrite, which is a pain. When I've needed to give specific mime-types to specific files, I've done it by having a regex to match only those files, and then overwritten the type map for only those files:

location ~* ^.+\.(manifest|appcache)$ {
    types         { }
    default_type  text/cache-manifest;
}
share|improve this answer
    
Ah, that is a pain :). Thank you for your help!!! –  Aaron Gibralter Oct 15 '11 at 20:38

It appears this has gotten easier since the question was asked. From http://stackoverflow.com/a/20566966:

You just need to specify additional types on the same level as your mime.types include:

include mime.types;
types {
    # here is additional types
}
share|improve this answer
    
its look like user accepted the answer already –  TBI Infotech Jul 24 at 5:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.