Question
How to configure the PHP-FPM plugin of 360 Monitoring on a Plesk server?
Answer
Note: All domains with the PHP-FPM plugin enabled must:
- have a valid SSL certificate
- be accessible (i.e. have correct DNS records, not blocked by a firewall, etc.)
For a single domain on Nginx (manually)
-
Go to Domains > example.com > PHP Settings
-
Add the following lines to the Additional directives field:
[php-fpm-pool-settings]
pm.status_path = /status_phpfpm -
Click OK
-
Go to Domains > example.com > Apache & nginx Settings
-
Add the following lines to the Additional directives for nginx:
location ~ ^/status_phpfpm$ {
fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass "unix:///var/www/vhosts/system/example.com/php-fpm.sock";
include /etc/nginx/fastcgi.conf;
} -
Click OK
-
Connect to the server via SSH
-
Add the following section to the file
/etc/agent360.ini
:[phpfpm]
enabled = yes
status_page_url = https://example.com/status_phpfpm?json -
Restart the service:
# systemctl restart agent360
Note: It is needed to repeat the steps for every domain that is needed to be monitored. For multiple domains, the section in /etc/agent360.ini
should look like this one:
[phpfpm]
enabled = yes
status_page_url = https://example.com/status_phpfpm?json, https://domain.tld/status_phpfpm?json, ...
For a single domain on Apache (manually)
-
Go to Domains > example.com > PHP Settings
-
Add the following lines to the Additional directives field:
[php-fpm-pool-settings]
pm.status_path = /status_phpfpm -
Click OK
-
Go to Domains > example.com > Apache & nginx Settings
-
Add the following lines to the Additional directives for HTTPS:
<LocationMatch "/status_phpfpm">
ProxyPass unix:///var/www/vhosts/system/example.com/php-fpm.sock|fcgi://127.0.0.1:9000
</LocationMatch> -
Click OK
-
Connect to the server via SSH
-
Add the following section to the file
/etc/agent360.ini
:[phpfpm]
enabled = yes
status_page_url = https://example.com/status_phpfpm?json -
Restart the service:
# systemctl restart agent360
Note: It is needed to repeat the steps for every domain that is needed to be monitored. For multiple domains, the section in /etc/agent360.ini
should look like this one:
[phpfpm]
enabled = yes
status_page_url = https://example.com/status_phpfpm?json, https://domain.tld/status_phpfpm?json, ...
Warning: Changes in the templates might result…