Script to spawn php5-cgi to enable Nginx to serve PHP code/pages
Volodymyr Kostyrko
c.kworr at gmail.com
Thu Nov 6 12:36:11 MSK 2008
Mark Alan wrote:
> Phillip B Oldham wrote:
>>> DAEMON_ARGS="-q -b 127.0.0.1:9000"
>> Isn't it better to use a unix socket for connection?
>>
>> `/usr/bin/php-cgi -q -b unix:/tmp/php-fastcgi`
>
> Why?
>
> Unix sockets will need buffers in kernel memory instead of simply using
> the file system. If that is better or worse is something that need
> further testing. Have you tested it?
1. Works like a charm for me for 1 year.
2. Security can be added so only specified users can connect to this
socket. You can't do this to tcp port, so tcp can be locally compromised
to get privileges of the user running php-cgi.
3. TCP _is_ slower then unix sockets. And it _is_ buffered too.
--
Sphinx of black quartz judge my vow.
More information about the nginx
mailing list