php_info - fastcgi_split_path_info - Not does not work
edisoti
nginx-forum at nginx.us
Fri Oct 21 12:12:41 UTC 2011
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;
--------------------------------------------------------------------------
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,216975,216975#msg-216975
More information about the nginx
mailing list