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 8c3b4b7d22..854d6450a3 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