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 1:19:23 pm
List:ru.sysoev.nginx

Thanks, that makes sense. (FYI I've lots of tech experience but not in this area.) The problem is that I'm experimenting with maximum security configs, so I'm running PHP in its own chroot, separate from the webserver and mysql. Basically everything sequestered, so each component sees only what it needs to see.

Since wordpress code, including styles, jpegs, etc. is installed in the PHP chrooted tree, I have to go through PHP to get at it. I could always run a dedicated nginx instance in the PHP jail, so requests for e.g. css files could bypass the PHP service, but it would be better to have PHP handle it all. Maybe. Dunno, just experimenting.

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?

BTW, is there a way to log the message received from the upstream PHP server?

Thanks,

gregg

On 3/13/07, Roxis <roxi@public.gmane.org> wrote:

On Tuesday 13 March 2007, Gregg Reynolds wrote:

HTTP/1.x 200 OK Server: nginx/0.5.14 Date: Tue, 13 Mar 2007 18:42:10 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.2.1

it seems that you pass all files through fastcgi server like this:

location / { fastcgi_pass unix:/tmp/php-fcgi.sock; }

and you really shouldn't

this is right way:

location ~ \.php$ { fastcgi_pass unix:/tmp/php-fcgi.sock; }