404.php

Mike Baikov mike at baikov.com
Fri Dec 26 21:31:45 MSK 2008


При текущей конфигурации перестали работать несуществующие ссылки, 
заканчивающиеся слешом.

Что может быть неправильным?

server {
......
         error_page              404 /404.php;

         location / {
...
             index               index.html index.php;


         }

         location = /404.php {
             root                              ...........
             proxy_intercept_errors              off;
             fastcgi_intercept_errors            off;
             fastcgi_pass 
unix:/var/tmp/nginx/fastcgi/fastcgi-socket;
             fastcgi_index                       index.php;
             fastcgi_connect_timeout             90;
             fastcgi_send_timeout                120;
             fastcgi_read_timeout                120;
             fastcgi_buffer_size                 4k;
             fastcgi_buffers                     4 32k;
             fastcgi_busy_buffers_size           64k;
             fastcgi_temp_file_write_size        64k;
             fastcgi_param   DOCUMENT_ROOT       ....
             fastcgi_param   SCRIPT_FILENAME     ....
             fastcgi_param   PATH_TRANSLATED     ...
             include /etc/nginx/fastcgi_params;
	}

         location ~ \.php$ {
             root                                ....
             fastcgi_pass 
unix:/var/tmp/nginx/fastcgi/fastcgi-socket;
             fastcgi_index                       index.php;
             fastcgi_connect_timeout             90;
             fastcgi_send_timeout                120;
             fastcgi_read_timeout                120;
             fastcgi_buffer_size                 4k;
             fastcgi_buffers                     4 32k;
             fastcgi_busy_buffers_size           64k;
             fastcgi_temp_file_write_size        64k;
             fastcgi_intercept_errors            on;
             fastcgi_param   DOCUMENT_ROOT       ....
             fastcgi_param   SCRIPT_FILENAME     ....
             fastcgi_param   PATH_TRANSLATED     ....
             include /etc/nginx/fastcgi_params;
         }
     }





More information about the nginx-ru mailing list