NGINX, Dotclear y PATH_INFO

Me ha funcionado la configuración que hay en http://yalis.fr/cms/index.php/post/2013/10/26/Configure-PHP-with-Nginx-only-once-for-several-aliases :

server {
        listen 80 default_server;
        root /var/www/html;
        index index.php index.html;

        location / {
                rewrite ^(/.*?\.php)(/.*)?$ /...$document_root/.../...$1/...$2 last;
                autoindex on;
        }

        location /... {
                internal;
                autoindex off;
                location ~ ^/\.\.\.(?<p_doc_root>.*)/\.\.\.(?<p_prefix>.*)/\.\.\.(?<p_script>.*\.php)/\.\.\.(?<p_pathinfo>.*)$ {
                        fastcgi_pass unix:/var/run/php5-fpm.sock;
                        fastcgi_index index.php;
                        include fastcgi_params;
                        fastcgi_param SCRIPT_FILENAME $p_doc_root$p_script;
                        fastcgi_param SCRIPT_NAME     $p_prefix$p_script;
                        fastcgi_param REQUEST_URI     $p_prefix$p_script$p_pathinfo$is_args$query_string;
                        fastcgi_param DOCUMENT_URI    $p_prefix$p_script$p_pathinfo;
                        fastcgi_param DOCUMENT_ROOT   $p_doc_root;
                        fastcgi_param PATH_INFO       $p_pathinfo if_not_empty;
                        #fastcgi_param PATH_TRANSLATED $p_doc_root$p_pathinfo;
                }
        }
}

 

 

Deja un comentario

El código HTML se muestra como texto y las direcciones web se transforman automáticamente.

Arriba