This commit is contained in:
midoks
2022-07-07 17:23:00 +08:00
parent 2061d40fcd
commit 21c23f98a1
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -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;
+3 -5
View File
@@ -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']))