3

How many fastcgi handlers can httpd configuration file have? I want to set up httpd server to server multiple fastcgi programs running on different tcp sockets. For example: http://uwsgi-docs.readthedocs.io/en/latest/OpenBSDhttpd.html

server "default" {
    listen on 0.0.0.0 port 80

    fastcgi socket ":3031"
}

Is it possible to have another fastcgi program listening on 3032 , 3034 etc?

KartDev
  • 75
  • 2
  • 8

1 Answers1

2

The short answer is Yes, enough that you shouldn't need to worry.

There is no apparent hardcoded limit. You can only have one fastcgi option per server or location block, but you can have many locations per server, like on the example page you gave:

server "default" {
    listen on 0.0.0.0 port 80

    location "/foo/*" {
        fastcgi socket ":3031"
    }

    location "/cgi-bin/*" {
        fastcgi socket ":3032"
    }
}

While parse.y cumulatively limits this as INT_MAX, in reality you will be limited to the number of file descriptors allowed/available per process (including httpd's other tasks that need fd's)

pete
  • 842
  • 10
  • 13