I have written a FCGI implementation that I use in a Webserver. I wanted to replace a simple setup with lighttpd.
And I found something odd.
When I try to spawn a Python-Flup server and then connect to it, it only works if I use a TCP Socket
(My Code).
However, in my existing setup with Flup and lighttpd it works also with Unix Domain Sockets.
(In FCGI, the Webserver gives the listening socket to the FCGI server as stdin). So I took a look at Flups code (found it only local and here). It seems that only TCP is handled, so UDS should not work. But with lighttpd it somehow does!
fastcgi.server = (
"/heiz" =>
(
"python-fcgi" =>
(
"socket" => "/tmp/fastcgi2.python.sock",
"bin-path" => "/var/www/heiz/flup.fcgi",
"check-local" => "disable",
"max-procs" => 1
)
)
)
runs like:
sudo ss -lxp | grep /tmp/fastcgi2.python.sock
u_str LISTEN 0 1024 /tmp/fastcgi2.python.sock-0 4378053 * 0 users:(("flup.fcgi",pid=349092,fd=3),("flup.fcgi",pid=349092,fd=0))
But how? What am I missing?
I think the relevant parts are here and here
Is it due to this magic?
I am confused