FastCGI

FastCGI is a PHP implementation of the Common Gateway Interface (CGI). It works especially well with NGINX.


Setup Files

Serve .cgi sripts from either a dedicated top-level directory (i.e., /srv) or from the traditional web content directory (i.e., /var/www). The former may be a more attractive option if using jails or separate (often read-only) mounted partitions.

Write the below to cgi/test.php, under whichever directory structure you prefer.

<?php phpinfo(); ?>


Install Software

At a minimum, we need: php, php-fpm, fcgi, fcgiwrap, and nginx.

Common additional tools include:


Configuration

PHP

PHP-FPM

FastCGI

NGINX


Startup


Maintenance


CategoryRicottone