diff --git a/plugins/zabbix/conf/zabbix.nginx.conf b/plugins/zabbix/conf/zabbix.nginx.conf index 37e14dd5a..e1c69a3e9 100644 --- a/plugins/zabbix/conf/zabbix.nginx.conf +++ b/plugins/zabbix/conf/zabbix.nginx.conf @@ -19,7 +19,7 @@ server #ERROR-PAGE-END #PHP-INFO-START - include {$SERVER_PATH}/web_conf/php/conf/enable-php-80.conf; + include {$SERVER_PATH}/web_conf/php/conf/enable-${PHP_VER}.conf; #PHP-INFO-END #禁止访问的文件或目录 diff --git a/plugins/zabbix/index.py b/plugins/zabbix/index.py index b3bb10b71..c3b0c36e6 100755 --- a/plugins/zabbix/index.py +++ b/plugins/zabbix/index.py @@ -271,13 +271,14 @@ def initZsConf(): def initPhpConf(): - + phpver = getInstalledPhpConfDir() php_src_tpl = getPluginDir()+'/conf/zabbix.conf.php' php_dst_path = zabbixPhpConf() # php配置 if not os.path.exists(php_dst_path): content = mw.readFile(php_src_tpl) content = contentReplace(content) + content = content.replace('{$PHP_VER}',phpver,content) mw.writeFile(php_dst_path, content) def initAgentConf():