The solution to the 500 error that the project is deployed to the server shows that the webpage cannot be accessed

insert image description here

The first step in the title is to make changes to the php.ini file

// 把php.ini 文件中的Off 更改为下方On
display_errors = On
display_startup_errors = On

Run it: php - fpm
reports the following prompt information please: delete php-cgi.sock before running php - fpm

[05-Jun-2019 13:11:00] ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
[05-Jun-2019 13:11:00] ERROR: FPM initialization failed

If you run it, report an error

(My side is the TP error report, Lravel is roughly the same as the error below, and the solution is the same)
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/tp5.test.com/ tp5/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/tp5.test.com/tp5/public/:/tmp/:/proc/) in /www/wwwroot/tp5 .test.com/tp5/public/index.php on line 17

Warning: require(/www/wwwroot/tp5.test.com/tp5/thinkphp/start.php): failed to open stream: Operation not permitted in /www/wwwroot/tp5.test.com/tp5/public/index.php on line 17

My server is the nginx configuration file of nginx

Find usr/local/nginx/fastcgi.conf
to copy and paste the display part directly and comment out the original part!

#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
fastcgi_param PHP_ADMIN_VALUE "open_basedir=NULL";

restart nginx -s reload


**The above part is a personal mining pit, I hope it can be helpful to you! ** *belongs to personal creation*

Guess you like

Origin blog.csdn.net/weixin_40069439/article/details/90902149