Php_info - fastcgi_split_path_info - Not does not work

I am having trouble setting the PATH_INFO

I want accessing thus:
http://www.examples.com/test.php/images/test/000001

LOGS
2011/10/20 15:54:51 [error] 76110#0: *1 open()
“/var/www1/examples.com/test.php/dddd/eeee” failed (20: Not a
directory), client: 200.12.10.92, server: examples.com, request: “GET
/test.php/dddd/eeee HTTP/1.1”, host: “www.examples.com

nginx.conf

user www;
worker_processes 4;
worker_rlimit_nofile 8192;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local]
$status ’
'“$request” $body_bytes_sent “$http_referer” ’
‘“$http_user_agent” “$http_x_forwarded_for”’;

    access_log /var/log/nginx/access.log main;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout 35;
    tcp_nodelay on;
    server_names_hash_bucket_size 128;
    gzip on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server {
listen 80;
server_name examples.com www.examples.com;
access_log /var/log/nginx/examples.com-access.log main;
error_log /var/log/nginx/examples.com-error.log;

      root /var/www1/examples.com;
      index index.php index.html index.htm;

      location /nginx_status {
              stub_status on;
              access_log off;
              allow 127.0.0.1;
              deny all;
      }

      location ~ ^.+\.php$ {
              include                         fastcgi_params;
              fastcgi_intercept_errors        on;
              fastcgi_pass                    unix:/tmp/php.socket;
      }

}
}

fastcgi_params

fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$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 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;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/1.0.8;

fastcgi_param REMOTE_ADDR $remote_addr;
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_index index.php;

PHP only, required if PHP was built with --enable-force-cgi-redirect

fastcgi_param REDIRECT_STATUS 200;

On Fri, Oct 21, 2011 at 08:12:41AM -0400, edisoti wrote:

Hi there,

I am having trouble setting the PATH_INFO

I want accessing thus:
http://www.examples.com/test.php/images/test/000001

The “location” here is /test.php/images/test/000001

      location /nginx_status {

It doesn’t match that one.

      location ~ ^.+\.php$ {

It doesn’t match that one.

So fastcgi_split_path_info is not used.

As a short-term test, to confirm that the directives act as you expect,
change this location definition to

location ~ php

Then when you are happy that you understand what everything is doing,
change it to something that is right for your environment.

(Perhaps some variation on “.php($|/)” will be right for you; or
perhaps
nesting it inside a non-regex location.)

Good luck,

f

Francis D. [email protected]