The following only LNMP 1.4 version of the solution, LNMP other versions please refer to the official website Https://lnmp.org/faq/lnmp-vhost-add-howto.html#user.ini
Workaround One: Lnmp 1.4 can also be directly used in the lnmp1.4/tools/directory under the./remove_open_basedir_restriction.sh, enter the site's full path (such as/www/wwwrooter/testweb) Enter to both
Workaround two: Lnmp 1.4 If you do not want to use anti-cross directory or modify. User.ini's anti-cross directory directory also needs to be/usr/local/nginx/conf/fastcgi.conf inside the Fastcgi_param php_admin_ VALUE "open_basedir= $document _root/:/tmp/:/proc/"; Add # or delete a row before the line, you need to restart Nginx.
Here I tried to be invalid, you can try, modify the fastcgi.conf after the execution
Service Nginx Restart
Service PHP-FPM Restart
Description Because my server PHP environment is built using the LNMP integration pack, this is why
In thinkphp, CodeIgniter, Laravel and other frameworks, the site directory is generally under public, but the public program to call the public in the parent directory across directories, because the LNMP default is not allowed cross-directory access, Therefore, it is necessary to remove the anti-cross Directory access settings, and sometimes these framework class program tips 500 error may be caused by this problem. ( Https://lnmp.org/faq/lnmp-vhost-add-howto.html#user.iniwritten on the official website)
Asked for a long time, or through the TP5 official website of the comments found solution, TP5 document https://www.kancloud.cn/manual/thinkphp5/336757
Deploying THINKPHP5 tips on Linux 500