看到好多人稀罕俺用的这个探针,今天就讲讲怎么配置这个探针。探针页面:
https://hostalk.net/tz.php
下载探针:https://hostalk.net/tz.php?method=raw
下载好的探针放在网站根目录,然后配置一下nginx伪静态:
vi /etc/nginx/sites-available/default
#nginx.conf文件80或443端口下添加下面内容
location ~ tz\.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
最后改一下php的端口:
vi /etc/php/7.2/fpm/pool.d/www.conf
listen = /var/run/php/php7.2-fpm.sock
修改为:
listen = 127.0.0.1:9000
最后重启一下nginx和php就好了。(注意php版本)