mime types

Gregg Reynolds dev at mobileink.com
Tue Mar 13 23:19:46 MSK 2007

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?



On 3/13/07, Roxis <roxis at list.ru> 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;
> }

More information about the nginx mailing list