What are the best practices for passing requests to the php-cgi interpreter in a server setup?

When passing requests to the php-cgi interpreter in a server setup, it is best practice to use FastCGI to improve performance and scalability. This can be achieved by configuring the web server to communicate with php-cgi via FastCGI. This setup allows for better resource management and handling of PHP requests.

# Example configuration for Apache web server using FastCGI to pass requests to php-cgi

<IfModule mod_fastcgi.c>
    FastCgiServer /path/to/php-cgi
    AddHandler php-fastcgi .php
    Action php-fastcgi /php-fastcgi
    Alias /php-fastcgi /path/to/php-cgi
</IfModule>