Difference between revisions of "FastCGI"

From wikieduonline
Jump to navigation Jump to search
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
One of the main use-cases of FastCGI proxying within [[Nginx]] is for [[PHP]] processing. Unlike Apache, which can handle PHP processing directly with the use of the mod_php module, Nginx must rely on a separate PHP processor to handle PHP requests. Most often, this processing is handled with php-fpm, a PHP processor that has been extensively tested to work with Nginx.
+
One of the main use-cases of FastCGI proxying within [[Nginx]] is for [[PHP]] processing. Unlike Apache, which can handle PHP processing directly with the use of the mod_php module, Nginx must rely on a separate PHP processor to handle PHP requests. Most often, this processing is handled with <code>[[php-fpm]]</code>, a PHP processor that has been extensively tested to work with Nginx.
  
 +
 +
* <code>[[/etc/nginx/nginx.conf]]</code>: <code>fastcgi_pass</code>
 +
 +
Directives:
 +
* <code>fastcgi_param</code>
 +
* <code>fastcgi_pass</code>
 +
 +
 +
 +
:<code>[[/etc/nginx/fastcgi.conf]]</code>
 +
:<code>/etc/nginx/snippets/fastcgi-php.conf</code>
 +
 +
 +
 +
:<code>[[fastcgi_pass]] unix:/var/run/php/php7.2-fpm.sock;</code>
 +
 +
 +
* <code>[[error.log (Nginx)|error.log]]</code>
 +
FastCGI sent in stderr: "PHP message: [[PHP]] Fatal error: Uncaught Error: Class .../...
 +
.
 +
 +
 +
Sep 11 15:44:31 SERVER systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
 +
 +
== Related terms ==
 +
* [[UWSGI]]
 +
* <code>[[systemctl status php7.2-fpm]]</code>
 +
* <code>[[php-fpm]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{PHP}}
 
* {{nginx}}
 
* {{nginx}}
  
 
[[Category:Computing]]
 
[[Category:Computing]]

Latest revision as of 13:59, 23 March 2023

One of the main use-cases of FastCGI proxying within Nginx is for PHP processing. Unlike Apache, which can handle PHP processing directly with the use of the mod_php module, Nginx must rely on a separate PHP processor to handle PHP requests. Most often, this processing is handled with php-fpm, a PHP processor that has been extensively tested to work with Nginx.


Directives:

  • fastcgi_param
  • fastcgi_pass


/etc/nginx/fastcgi.conf
/etc/nginx/snippets/fastcgi-php.conf


fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;


FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class .../...

.


Sep 11 15:44:31 SERVER systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...

Related terms[edit]

See also[edit]

Advertising: