error_page + FastCGI

Valentin Vesvalo valentin.vesvalo на syncopate.ru
Пн Авг 15 06:27:48 UTC 2011


????????????.

?? ??????? ??????????? ? ?????????? ????????? error_page.

??????? nginx (0.8.55), ???????????? ??????? ?? php-fpm.
????????? ???????? ???????? ???? ? ?????? ?????? 50x ??? ??????????
php-????????.

???????? ? ???, ??? ????????? error_page ????????????, ???? php-fpm
?????? ????? ??? ?????????? ???????, ???????????????? header ?? ????????
500:
<?php
header('Status: 500',true,500);

??????? header('HTTP/1.1 500 Internal Server Error',true,500) ??? ?? ??
???????? ? ????????? ??????????.

???? ?? php-fpm ?????? ?????????, ?? error_page ???????????? ??? ?????.

? ??? ????? ???? ???????

? ??????? ????????? ????????? ???????:

location = /500.html {
  root   html;
}

location ~ \.php$ {
 fastcgi_pass   localhst;
 fastcgi_index  index.php;
 include        fastcgi_params;
 fastcgi_param  SCRIPT_FILENAME  /wwwroot/test/public$fastcgi_script_name;
 error_page 500 501 502 503 = /500.html;
}


Valentin
----------- ???????? ????? -----------
???????? ? ??????? HTML ???? ?????????…
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20110815/42155061/attachment.html>


Подробная информация о списке рассылки nginx-ru