nginx+php-fpm+404

Денис alfa at 1nsk.ru
Wed May 21 14:57:30 MSD 2008


Здравствуйте, .

Вы писали 21 мая 2008 г., 16:26:25:

>                  error_page                       
> 404                             =200    /MISSING_PAGE;

>                  location                        /MISSING_PAGE {
>                          internal;
>                          rewrite                         ^/(.*) 
> $                         /                       last;
>                          break;
>                  }

Не помогает, 404 все еще валятся и No input file specified. никуда не делся.

на всякий случай...
версия 0.7.0, собирался
./configure \
               --without-poll_module \
               --prefix=/usr \
               --user=www-data \
               --group=www-data \
               --conf-path=/etc/nginx/nginx.conf \
               --pid-path=/var/run/nginx.pid \
               --error-log-path=/var/log/nginx/error.log \
               --http-log-path=/var/log/nginx/access.log \
               --http-client-body-temp-path=/var/cache/nginx/client-body \
               --http-proxy-temp-path=/var/cache/nginx/proxy \
               --http-fastcgi-temp-path=/var/cache/nginx/fastcgi  \
               --with-http_realip_module \
               --with-http_addition_module \
                --with-http_gzip_static_module \
               --with-http_stub_status_module \
               --enable-force-cgi-redirect \
               --add-module=/usr/src/debian/nginx/nginx_uploadprogress_module \
               --with-http_flv_module \

конфиг

server {
listen  domain.ru;
server_name domain.ru;
access_log  /var/log/nginx/access.log gzip;
error_log  /var/log/nginx/error.log;
error_page   502 503 504 509 /lib/500.html;
index index.php index.html;
location ^~ /lib/500.html {
root         /var/www/html/;
expires      10d;
}

error_page 404 =200 /MISSING_PAGE;

location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_param  QUERY_STRING     $query_string;
fastcgi_param  REQUEST_METHOD   $request_method;
fastcgi_param  CONTENT_TYPE     $content_type;
fastcgi_param  CONTENT_LENGTH   $content_length;
fastcgi_param   PATH_TRANSLATED /var/www/html$fastcgi_script_name;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;
fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  CONTENT_LENGTH     $content_length;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
include fastcgi_params;
}

location ~* ^.+\.(jpg|jpeg|gif|zip|rar|wmv|avi|css|js|swf|png|ico|htc)$ {
root         /var/www/html/;

}

location  /MISSING_PAGE {
internal;
rewrite ^/(.*)$ / last;
break;
}


}



--
Denis V. (ALFA-RIPE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 282 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20080521/98857e65/attachment.pgp>


More information about the nginx-ru mailing list