From 0a844d82977d8c4dc2b30647a88fe342f47e6a45 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 8 Jul 2022 01:13:39 +0800 Subject: [PATCH] up --- plugins/php-apt/conf/enable-php.conf | 2 +- plugins/php-apt/conf/phpfpm_status.conf | 4 ++-- plugins/php-apt/conf/phpinfo.conf | 2 +- plugins/php-apt/conf/www.conf | 8 ++++---- plugins/php-apt/index.py | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/php-apt/conf/enable-php.conf b/plugins/php-apt/conf/enable-php.conf index 9f8461da7..612058e6a 100644 --- a/plugins/php-apt/conf/enable-php.conf +++ b/plugins/php-apt/conf/enable-php.conf @@ -2,7 +2,7 @@ set $PHP_ENV 1; location ~ [^/]\.php(/|$) { try_files $uri =404; - fastcgi_pass unix:/var/opt/remi/php{$PHP_VERSION}/run/php-fpm/www.sock; + fastcgi_pass unix:/run/php/php{$PHP_VERSION}-fpm.sock; fastcgi_index index.php; include fastcgi.conf; include {$SERVER_PATH}/web_conf/php/pathinfo.conf; diff --git a/plugins/php-apt/conf/phpfpm_status.conf b/plugins/php-apt/conf/phpfpm_status.conf index aebdfae8f..7e995e03e 100644 --- a/plugins/php-apt/conf/phpfpm_status.conf +++ b/plugins/php-apt/conf/phpfpm_status.conf @@ -1,5 +1,5 @@ -location /phpfpm_status_yum{$PHP_VERSION} { - fastcgi_pass unix:/var/opt/remi/php{$PHP_VERSION}/run/php-fpm/www.sock; +location /phpfpm_status_apt{$PHP_VERSION} { + fastcgi_pass unix:/run/php/php{$PHP_VERSION}-fpm.sock include fastcgi_params; fastcgi_param SCRIPT_FILENAME \$fastcgi_script_name; } \ No newline at end of file diff --git a/plugins/php-apt/conf/phpinfo.conf b/plugins/php-apt/conf/phpinfo.conf index b3c51e657..401302116 100644 --- a/plugins/php-apt/conf/phpinfo.conf +++ b/plugins/php-apt/conf/phpinfo.conf @@ -1,4 +1,4 @@ location /{$PHP_VERSION} { root {$ROOT_PATH}/phpinfo; - include {$SERVER_PATH}/web_conf/php/conf/enable-php-yum{$PHP_VERSION}.conf; + include {$SERVER_PATH}/web_conf/php/conf/enable-php-apt{$PHP_VERSION}.conf; } \ No newline at end of file diff --git a/plugins/php-apt/conf/www.conf b/plugins/php-apt/conf/www.conf index 47b8349e4..4b3cd5da8 100644 --- a/plugins/php-apt/conf/www.conf +++ b/plugins/php-apt/conf/www.conf @@ -2,7 +2,7 @@ user = {$PHP_USER} group = {$PHP_GROUP} -listen = /var/opt/remi/php{$PHP_VERSION}/run/php-fpm/www.sock +listen = /run/php/php{$PHP_VERSION}-fpm.sock listen.owner = {$PHP_USER} listen.group = {$PHP_GROUP} pm = dynamic @@ -10,10 +10,10 @@ pm.max_children = 50 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 35 -pm.status_path = /phpfpm_status_yum{$PHP_VERSION} +pm.status_path = /phpfpm_status_apt{$PHP_VERSION} request_terminate_timeout = 100 request_slowlog_timeout = 30 -slowlog = /var/opt/remi/php{$PHP_VERSION}/log/php-fpm/www-slow.log +slowlog = /var/log/fpm-php{$PHP_VERSION}.www.slow.log php_admin_flag[log_errors] = on -php_admin_value[error_log] = /var/opt/remi/php{$PHP_VERSION}/log/php-fpm/error.log \ No newline at end of file +php_admin_value[error_log] = /var/log/fpm-php{$PHP_VERSION}.www.log \ No newline at end of file diff --git a/plugins/php-apt/index.py b/plugins/php-apt/index.py index f267b3df5..b2f149839 100755 --- a/plugins/php-apt/index.py +++ b/plugins/php-apt/index.py @@ -228,7 +228,7 @@ def initdStatus(version): return "Apple Computer does not support" shell_cmd = 'systemctl status php' + version + \ - '-php-fpm | grep loaded | grep "enabled;"' + '-fpm | grep loaded | grep "enabled;"' data = mw.execShell(shell_cmd) if data[0] == '': return 'fail' @@ -239,7 +239,7 @@ def initdInstall(version): if mw.isAppleSystem(): return "Apple Computer does not support" - mw.execShell('systemctl enable php' + version + '-php-fpm') + mw.execShell('systemctl enable php' + version + '-fpm') return 'ok' @@ -247,7 +247,7 @@ def initdUinstall(version): if mw.isAppleSystem(): return "Apple Computer does not support" - mw.execShell('systemctl disable php' + version + '-php-fpm') + mw.execShell('systemctl disable php' + version + '-fpm') return 'ok'