Does PHP or LIghttpd create a fastcgi socket?

I am working on setting this up on Mac OS X Leopard. I have a hell of a time when PHP5 works like fastcgi under lighttpd. I checked that I compiled php with fastcgi enabled. I tried to configure lighttpd, as I saw in various docs.

The kernel that I do not understand is that php-cgi must create a socket, or if lighttpd creates it.

My lighttpd configuration is as follows:

fastcgi.server = ( ".php" =>
        ( "localhost" =>
                (
                        "socket" => "/var/run/php-fastcgi.socket",
                        "bin-path" => "/usr/local/php/bin/php-cgi"
                )
        )
)

When I check / var / run / no php-fastcgi.socket was created.

+3
source share
3 answers

I tore my hair off with the same problem. Ive installed lighty and php so many times on linux, but I struggled to get a php fastcgi socket running under OSX.

cgi , php-cgi -b 127.0.0.1:5555

tcp lighty config... fastcgi.server = ( ".php" = > ( "localhost" = > ( "host" = > "127.0.0.1", "port" = > 5555)))

, , .

0

mod_fastcgi?

server.modules += ( "mod_fastcgi" )

, , /var/run?

Debian Etch:

fastcgi.server = ( ".php" =>
    ((
      "bin-path" => "/usr/bin/php5-cgi",
      "socket" => "/tmp/php.socket",
      "max-procs" => 1,
      "idle-timeout" => 20,

      "bin-environment" => (
        "PHP_FCGI_CHILDREN" => "1",
        "PHP_FCGI_MAX_REQUESTS" => "1000"),

      "bin-copy-environment" => (
        "PATH", "SHELL", "USER"),

      "broken-scriptfilename" => "enable"
     ))
    )
+2

httpd almost certainly creates it, so fastcgi can inherit it after formatting the executable.

+1
source

Source: https://habr.com/ru/post/1706656/


All Articles