![](/img/trans.png)
[英]unable activate php-fpm /status|ping -page with nginx on debian6 + PLESK 12
[英]PHP-FPM status page on Plesk + NGINX proxy
我试图在Plesk 17下运行的vhost上启用PHP-FPM状态页面,使用apache来提供PHP文件,但是使用nginx作为代理。 我已启用php的状态页面,但我遇到了nginx规则的问题。 到目前为止,这是我的附加nginx指令
location /fpm-status {
include fastcgi.conf;
fastcgi_pass unix:/var/www/vhosts/system/fifthelement.gr/php-fpm.sock;
access_log off;
allow all;
}
但是,这个(以及我尝试的其他一些指令)似乎不起作用,因为我在访问状态页面时遇到“找不到文件”错误。
有没有人设法做到这一点?
谢谢!
状态页面需要端口80/443用于apache2,但与Plesk结合使用时,您的apache2 - webserver将侦听端口80/643上的端口7080/7081和nginx。
PLS。 用例如
<IfModule mod_status.c> Listen 8005 <Location /apache-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 ::1 </Location> ExtendedStatus On </IfModule>
在您的server.conf,httpd.conf中并从您的SSH命令行调用页面,例如“lynx”
lynx http://localhost:8005/apache-status
对于您的PHP-FPM - 状态 - 页面,请。 找到相应的“fifthelement.gr.conf”(使用您所在域的供应商提供的标准PHP5 - Handler的示例:“/ etc / php5 / fpm / pool.d / fifthelement.gr.conf”)并在里面定义:
pm.status_path = /fpm-status
然后,修改您的附加nginx指令,例如:
location /fpm-status { include fastcgi.conf; allow 127.0.0.1; deny all; fastcgi_pass unix:/var/www/vhosts/system/fifthelement.gr/php-fpm.sock; access_log off; }
...再次,您可以使用“lynx”与示例 - 命令:
lynx http://localhost/fpm-status
以下适用于我在CentOS 7上使用PLESK 17(在Plesk>网站与域名> [您的域名]>主机设置我有:运行PHP作为由nginx提供的FPM应用程序 )
获取工作/状态页面的步骤
创建/编辑/var/www/vhosts/system/[yourdomainname]/conf/php.ini
添加以下内容
[php-fpm-pool-settings] pm.status_path = /status
在Plesk内部>网站与域名> [yourdomainname]> Apache&nginx设置添加到其他nginx指令以下
location ~ ^/status$ { allow 127.0.0.1; allow [yourip]; deny all; fastcgi_split_path_info ^((?U).+\\\\.php)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass "unix:///var/www/vhosts/system/[yourdomainname]/php-fpm.sock"; include /etc/nginx/fastcgi.conf; }
重新加载Plesk PHP配置
/usr/local/psa/bin/php_settings -u
然后你应该能够访问http:// [yourdomainname] / status和http:// [yourdomainname] / status?full
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.