fastcgi server variables vs. apache

spirit nginx-forum at nginx.us
Wed Dec 16 16:40:17 MSK 2009


@shizobuddy: /path/to/php is usually $document_root if set properly so you come up with the following generic config:

fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

@androo: instead of setting fastcgi_param in a if (in fact you can't), you can still set variables to do so. Example

        
        set $script index.php;
        set $path_info "";
        if ($uri ~ "^(.+\.php)(.*)") {
            set $script $1;
            set $path_info $2;
        }
        fastcgi_param PATH_INFO $path_info;
        ....


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,866,30886#msg-30886




More information about the nginx mailing list