Deploying THINKPHP5 tips on Linux 500

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.