Re: настройка FastCGI

Peter Vereshagin peter на vereshagin.org
Пт Дек 18 15:08:12 MSK 2009


Concrete jungle, oh nginx-ru, you've got to do your best...
2009/12/18 06:36:53 -0500 NT Man <nginx-forum at nginx.us> => To nginx-ru at nginx.org :
NM> > вынести все fastcgi_param в секцию http{}
NM> А можно показать на примере?

===
http {
...

                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  REMOTE_ADDR     $remote_addr;
                fastcgi_param  PATH_INFO        $fastcgi_path_info;
...
    server {	#	http://alpha.vereshagin.org
        location ~ \.pl/?.*$ {
                fastcgi_split_path_info         ^(.+\.pl)(.*)$;
            fastcgi_pass   unix:/tmp/spawner.sock;
					}

                        location ~ .(php|phtml)$ {
                                        fastcgi_pass   unix:/tmp/php-fcgi.sock;
																				...
													                                charset windows-1251;

                        }
												...
                        location ~ ^(([^\.]*\.html)|([^\.]+))$ {
                                rewrite ^(.+)$ /index.pl$1;
                          set     $path_info      $1;
                        }
===

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)
-- 
http://vereshagin.org



Подробная информация о списке рассылки nginx-ru