Let's look at the error first.
The status code is: ==500== is usually the server that error.
Then Emmmmmm .....
Test 1
The code that first modifies the index.php is preceded by the code:
echo "1111";exit();
Look at the return result:
As you can see, the server can parse normally.
Then we look at the Nginx error log:
① came to nginx log directory
cat error.log
Let's look at the return result:
==signal Process started==
= = is a notification from the system, not an error = =
Later, after the inspection, found that the database is no problem.
Think about, the general 500 error, although the server, but not very clear, looked up ...
Based on the actual reasons, the server resources are still abundant, should not be a performance resource problem. And think about whether the code is a problem ...
The code from the official get to, should not have the problem of it ....
The mood at this time should be this:
With a helpless mood to change the PHP configuration:
= = want to know PHP code is not a problem, we need to debug! ==
So the debug of ==php7.x is off (off) by default = =
PHP configuration file is generally named: php.ini
This is true for both Windows and Linux
We use VIM to change php.ini
Open the php.ini will be like this
How do we find the place we need to change?
We use ==?== to find
==display_errors== is the debug mode
:?
:
You can see that there are short documents in the configuration information
Right now
= = Will display_errors = off==
= = Changed to: display_errors = on==
Note Case, the front o are all uppercase
Then we save
Then restart PHP
/etc/init.d/php-fpm restart
WOC, excited to death
I looked at the error message :(manual dazed)
Thinking a turn, immediately think of, I was a communist successor, so I learned Mao Zedong's sentence: "Investigation is to solve the problem"
2333333 .....
Why is it that the nine-lent Granny died in the street? Hundreds of female donkey why the night scream why the girl dormitory underwear repeatedly stolen female dorm panties Why the frequent theft of serial rape Sow case is who is the door of the old nun is knocking on what is a ghost hundreds of female dog accidentally died behind and hidden what all this behind!! Is it the distortion of human nature or the loss of morals? Is the sexual eruption or hunger and thirst of frustration please pay attention to not learn the net, let us follow the lens into the inner world of the pervert.
I have to go to the bathroom. (Manual funny)
According to their experience, as well as the information.
I immediately broke the power:
Then change:
In simple terms:
Redirects in PHP code can only jump to files within the Web root set in the Nginx configuration. "is the subordinate directory"
But our code jumps to the top-level directory, which is the last level of the Web root directory, not within the root directory, so it is saved.
= = then save, restart nginx==
Then visit the page:
By: Kill me with a knife!!!
Later found that it was website root directory without permissions
I knocked down in embarrassment.
Chmod -R 777 blog
After giving the permission
WOC, Success!!!
The mood at this time:
nginx+php frame laravel Status Code 500 error resolved!