Answer the question
In order to leave comments, you need to log in
How to handle 500 php-fpm error from nginx?
Actually there is an nginx config with the following content:
server {
listen 80;
server_name example.com;
set $path "/var/www";
root $path/public;
index index.html index.htm;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root $path/system;
}
location = / {
try_files @site @site;
}
location / {
try_files $uri $uri/ @site;
}
location @site {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $path/site/index.php;
}
}
Answer the question
In order to leave comments, you need to log in
You have exactly this and it is written in the line:error_page 500 502 503 504 /50x.html;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question