Discussions

Ask a Question
Back to all

failure on configure PHP-FPM Plugin

I have different domains and subdomains in my server and they have it is own php fpm dedicated applications. I have status pages for each domain/subdomain with following code in Additional nginx directives for particular domain.

location ~ ^/status$ {

allow 127.0.0.1;
    allow MY_EXTERNAL IP;
fastcgi_pass "unix:///var/www/vhosts/system/subdomain.domain.com/php-fpm.sock";
fastcgi_split_path_info ^((?U).+\\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include /etc/nginx/fastcgi.conf;
deny all;
```}

The status page is accessible via browser. Setting fastcgi_pass 127.0.0.1:9000; not working in my case, it returns 502 error. I have created /etc/agent360-custom.ini with this code

[phpfpm]  
enabled = yes  
status_page_url = <https://subdomain.domain.com/status?json/status?json>

But agent360 --test phpfpm returns forbidden. (executing is root and also system admin user)  
phpfpm:  
Execution error: HTTP Error 403: Forbidden

Also wget -qO- <https://127.0.0.1:443/status?json> returns empty result.

What should I do? How can I get internal ip and port info and how status  page is resolved as a lot of status pages presented for each domain / subdomain and each of them uses it is own dedicated php fpm?

Thank you very much.