diff --git a/plugins/php/conf/www.conf b/plugins/php/conf/www.conf index 072c7e742..2128a6316 100644 --- a/plugins/php/conf/www.conf +++ b/plugins/php/conf/www.conf @@ -10,7 +10,6 @@ pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.status_path = /phpfpm_status_{$PHP_VERSION} - - -request_slowlog_timeout = 1 +request_terminate_timeout = 100 +request_slowlog_timeout = 30 slowlog = {$SERVER_PATH}/php/{$PHP_VERSION}/var/log/www-slow.log \ No newline at end of file diff --git a/plugins/php/index.html b/plugins/php/index.html index 71913d3cd..7995b5c98 100755 --- a/plugins/php/index.html +++ b/plugins/php/index.html @@ -7,8 +7,9 @@

安装扩展

配置修改

上传限制

- +

超时限制

配置文件

+

FPM配置

禁用函数

性能调整

负载状况

diff --git a/plugins/php/index.py b/plugins/php/index.py index 27f72c400..98af7b885 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -204,6 +204,10 @@ def phpFpmWwwReplace(version): mw.writeFile(service_php_fpmwww, content) +def getFpmConf(version): + return getServerDir() + '/' + version + '/etc/php-fpm.d/www.conf' + + def makePhpIni(version): dst_ini = mw.getServerDir() + '/php/' + version + '/etc/php.ini' if not os.path.exists(dst_ini): @@ -400,7 +404,7 @@ def submitPhpConf(version): def getLimitConf(version): fileini = getServerDir() + "/" + version + "/etc/php.ini" phpini = mw.readFile(fileini) - filefpm = getServerDir() + "/" + version + "/etc/php-fpm.conf" + filefpm = getFpmConf(version) phpfpm = mw.readFile(filefpm) # print fileini, filefpm @@ -443,7 +447,7 @@ def setMaxTime(version): if int(time) < 30 or int(time) > 86400: return mw.returnJson(False, '请填写30-86400间的值!') - filefpm = getServerDir() + "/" + version + "/etc/php-fpm.conf" + filefpm = getFpmConf(version) conf = mw.readFile(filefpm) rep = "request_terminate_timeout\s*=\s*([0-9]+)\n" conf = re.sub(rep, "request_terminate_timeout = " + time + "\n", conf) @@ -762,6 +766,8 @@ if __name__ == "__main__": print(getConfAppStart()) elif func == 'get_php_conf': print(getPhpConf(version)) + elif func == 'get_fpm_conf': + print(getFpmConf(version)) elif func == 'submit_php_conf': print(submitPhpConf(version)) elif func == 'get_limit_conf':