Reading from a named pipe / fifo

takigama nginx-forum at
Sat Jan 21 17:40:49 UTC 2012

Max Wrote:
> Unfortunately,
> the other app can provide the data only through a
> fifo and there's no easy way to change it due to
> licensing, so writing a fifo module for nginx
> would be the easier and cleaner solution. Igor and
> other developers, could you please give me a few
> tips to help me get started with the development
> of the fifo module? Thank you,
> Max

Personally, the way i'd do it is to write a bit of php (or python, perl,
etc) called via fast cgi to read your fifo (be mindful of the blocking
nature of pipes which can cause such things to hang waiting for input).

is an example of reading a fifo from php. And it would be quite easy to
do something like this (kinda off the top of my head):

        location /location/of/my/fifo.html {
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME

within the nginx config...

Posted at Nginx Forum:,221499,221507#msg-221507

More information about the nginx mailing list