5 messages in ru.sysoev.nginxRe: mime types
FromSent OnAttachments
Gregg ReynoldsMar 13, 2007 12:04 pm 
RoxisMar 13, 2007 12:39 pm 
Gregg ReynoldsMar 13, 2007 1:19 pm 
RoxisMar 13, 2007 1:41 pm 
Gregg ReynoldsMar 13, 2007 2:11 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: mime typesActions...
From:Gregg Reynolds (dev-@public.gmane.org)
Date:Mar 13, 2007 2:11:38 pm
List:ru.sysoev.nginx

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.

Thanks!

On 3/13/07, Roxis <roxi@public.gmane.org> 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