Please Nginx master explain to me... the meaning of this conf
仅有的幸福
仅有的幸福 2017-05-16 17:19:19
0
1
449
location ~ \.php {
        # try_files    $uri =404;

        fastcgi_index  /index.php;
        fastcgi_pass   127.0.0.1:9000;

        include 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;
    }

Mainly include the following lines.

仅有的幸福
仅有的幸福

reply all(1)
Peter_Zhu

Nginx itself does not have the function of automatically generating PATH_INFO, which means that some frameworks that use $_SERVER['PATH_INFO'] for scheduling cannot perform route scheduling normally. The code under include detects PATH_INFO and writes it into the Server parameter and passes it to PHP.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!