mime types

Gregg Reynolds dev at mobileink.com
Wed Mar 14 00:12:01 MSK 2007

Bingo!  I had to use a regex location string:

location /blog { fastcgi_pass ...etc... }
location ~* /blog.*css$ {
          <same as above>
          add_header Content-Type text/css;

But maybe a "detect-mime" directive would be useful for gateway
servers, since it isn't always reliable to use the extension.


On 3/13/07, Roxis <roxis at list.ru> wrote:
> On Tuesday 13 March 2007, Gregg Reynolds wrote:
> > So I still have the question of what nginx does with the content-type
> > of a message coming from PHP.  I'm guessing the problem is PHP is
> > serving up the wrong content type, and nginx just passes it along.  Is
> > that accurate?
> php sets Content-Type: text/html by default
> "add_header Content-Type text/css" in right place should help

More information about the nginx mailing list