In this recipe, we will look at how to work with multiple FCGI backends on the system. This can happen in a system where you have multiple types of applications running, such as a PHP application, a Python FCGI application, and so on.
It can also be the case that you want to isolate two application backends to prevent performance issues between them, as one slow application would definitely tie the other one down.
This is fairly straightforward, as you can create a simple fcgi_common
file that will contain the common FCGI configuration:
fastcgi_param SCRIPT_FILENAME /var/www/www.example1.com$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI ...