Page 1 of 1

PHP-FPM on SVR.JS

Posted: February 16th, 2024, 9:21 pm
by DorianNiemiecSVRJS
Hello, I got PHP-FPM to work with SVR.JS. I have developed the mod called "GreenRhombus" for FastCGI web applications.

Thanks to PHP-FPM, I'm getting faster response times with PHP web applications. Before switching from RedBrick and PHP-CGI, SVR.JS Forum (powered by phpBB) responded within 300ms. Now after switching to GreenRhombus and PHP-FPM it is only 100ms! I have checked it using time curl -I https://forum.svrjs.org.

How to do it?
If you want to use GreenRhombus only for PHP-FPM, configure greenrhombus-config.json like this (in this case we’re using socket in /run/php/php8.2-fpm.sock; you can check it in PHP-FPM configuration file, e.g. /etc/php/8.2/fpm/pool.d/www.conf; configure it without path property):

Code: Select all

{
  "socketPath": "/run/php/php8.2-fpm.sock"
}
And configure greenrhombus-scriptexts.json like this:

Code: Select all

[
  ".php"
]