From 674cf23141aec33f2c61e40b77d9f43cfe69cca3 Mon Sep 17 00:00:00 2001 From: liwenjie119 Date: Sun, 20 Dec 2020 00:31:55 -0600 Subject: [PATCH] fix kodexplore nginx info (#6053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复nginx的path_info,以及可道云中查看数据库的adminer的依赖 --- .../lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer b/package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer index 8c3b4b7d2..854d6450a 100755 --- a/package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer +++ b/package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer @@ -44,12 +44,14 @@ gen_nginx_config() { location = /50x.html { root html; } - location ~ \.php$ { + location ~ \.php(.*)$ { root $project_directory; try_files \$uri = 404; # PHP 文件不存在返回404 fastcgi_pass unix:/var/run/php7-fpm.sock; # 通过 Unix 套接字执行 PHP fastcgi_index index.php; + fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; # 修复 Nginx fastcgi 漏洞 + fastcgi_param PATH_INFO \$fastcgi_path_info; include /etc/nginx/fastcgi_params; } } @@ -75,7 +77,7 @@ gen_php_config() { unserialize_callback_func = serialize_precision = 100 - open_basedir = $storage_device_path:/tmp/:/proc/ + open_basedir = $storage_device_path:/tmp/:/proc/:/usr/bin/ disable_functions = disable_classes = expose_php = On