From 21c23f98a1a88f2a64201ef6ee62192c082c0655 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 7 Jul 2022 17:23:00 +0800 Subject: [PATCH] up --- plugins/php-yum/conf/phpfpm_status.conf | 2 +- plugins/php-yum/index.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/php-yum/conf/phpfpm_status.conf b/plugins/php-yum/conf/phpfpm_status.conf index 7c8370a27..aebdfae8f 100644 --- a/plugins/php-yum/conf/phpfpm_status.conf +++ b/plugins/php-yum/conf/phpfpm_status.conf @@ -1,4 +1,4 @@ -location /phpfpm_status_{$PHP_VERSION} { +location /phpfpm_status_yum{$PHP_VERSION} { fastcgi_pass unix:/var/opt/remi/php{$PHP_VERSION}/run/php-fpm/www.sock; include fastcgi_params; fastcgi_param SCRIPT_FILENAME \$fastcgi_script_name; diff --git a/plugins/php-yum/index.py b/plugins/php-yum/index.py index a20ff9317..f94744628 100755 --- a/plugins/php-yum/index.py +++ b/plugins/php-yum/index.py @@ -110,7 +110,7 @@ def contentReplace(content, version): def makeOpenrestyConf(): - phpversions = ['00', '74', '80', '81'] + phpversions = ['74', '80', '81'] sdir = mw.getServerDir() d_pathinfo = sdir + '/web_conf/php/pathinfo.conf' @@ -209,8 +209,6 @@ def restart(version): def reload(version): - if version == '52': - return phpOp(version, 'restart') return phpOp(version, 'reload') @@ -473,13 +471,13 @@ def getFpmStatus(version): return mw.returnJson(False, 'PHP[' + version + ']未启动!!!') try: - url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' + url = 'http://' + mw.getHostAddr() + '/phpfpm_status_yum' + version + '?json' result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) except Exception as e: - url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' + url = 'http://127.0.0.1/phpfpm_status_yum' + version + '?json' result = mw.httpGet(url, 1) data = json.loads(result) fTime = time.localtime(int(data['start time']))