ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nginx&Yii


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: nginx&Yii
  • From: äÍÉÔÒÉÊ - <i.am.corpix@xxxxxxxxx>
  • Date: Wed, 27 Oct 2010 09:12:40 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=onnTI6fXHQ+l0VCgeCCW1UAtsnGFNWF39ZzHE+7aosg=; b=xh50fes6DA6x2Rnpsl8amddl1dkk7wLjlEYL/2CxPVVw053fPtHxhdlpe9wJHJEKDF y7a36I3JRUWGHOfurVdao0Qqf2DHnqOPvuGdwyT0FGNMZ/gFj5LLrzWbVV5oj5FIg/Pp KVZi0HaZTjBnhQy/2Vlrp9rdtXYlmQq9hDCfQ=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ucJDb96ZFZYq8vI3sKxPnJhErJjRfomGItUGU75mo5CE6+qm/hj6Wd8JjNGnSCQIAe wyuHNThk/J8XiJj5VxHk16Mz2jUp0rGSekZdFM3xMViq9CSLUloMYtCTUx0BevFPUY0w CBN7MGlk+o/VjGySmXStWpVIwtIpnfi1wZ44M=
  • In-reply-to: <e1131e69a0fff0b9185838f15790670b.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <e1131e69a0fff0b9185838f15790670b.NginxMailingListRussian@xxxxxxxxxxxxxxx>

óÔÒÁÎÎÏÅ ÐÏ×ÅÄÅÎÉÅ.
ðÒÏÐÉÓÁÎÎÙ ÌÉ url rules(÷ Yii) ÄÌÑ gallery/view?
óÓÙÌËÉ ÎÁ ÉÚÏÂÒÁÖÅÎÉÑ ÓÏÚÄÁÀÔÓÑ ÞÅÒÅÚ createUrl?
÷ÏÔ ÍÏÊ ËÏÎÆÉÇ ÄÌÑ ÓÁÊÔÁ, ÓÄÅÌÁÎÎÏÇÏ ÎÁ yii framework
server {
ššš indexššš ššš ššš ššš index.php;
ššš server_tokensššš ššš ššš off;
ššš autoindexššš ššš ššš off;
ššš listenššš ššš ššš ššš 192.168.0.3:80;
ššš server_nameššš ššš ššš
domain.ru www.domain.ru;
ššš charsetššš ššš ššš ššš utf-8;
ššš access_logššš ššš ššš /var/log/nginx/
domain.ru-access.logššš main;
ššš error_logššš ššš ššš /var/log/nginx/
domain.ru-error.log;
ššš rootššš ššš ššš ššš /www/
domain.ru/pub/;
ššš
ššš location / {
ššš ššš if (!-e $request_filename){
ššš ššš rewrite (.*) /index.php/$1;
ššš ššš }
ššš }


ššš location ~ \.php {
ššš ššš fastcgi_passššš ššš unix:/var/run/php/php-fpm.sock;
ššš ššš fastcgi_indexššš ššš index.php;
ššš ššš fastcgi_paramššš ššš SCRIPT_FILENAME /www/domain.ru/pub/index.php;
ššš ššš includeššš ššš ššš fastcgi_params;
ššš }
šš ...
}

25 ÏËÔÑÂÒÑ 2010šÇ. 16:07 ÐÏÌØÚÏ×ÁÔÅÌØ No1 <nginx-forum@xxxxxxxx> ÎÁÐÉÓÁÌ:
[code]
š server
š š š š{
š š š š š š š šlisten š š š 80;
š š š š š š š šserver_name šsite;

š š š š š š š šroot /var/www/sie;
š š š š š š š šindex index.php;

š š š š š š š š location /
š š š š š š š š{
š š š š š š š štry_files š š š š$uri $uri/ /index.php$uri;
š š š š š š š š}

š š š š š š š šlocation ~ \.(js|ico|gif|jpg|png|css|flv)$ {
š š š š š š š š š š}
š š š š š š š šlocation ~ \.php
š š š š š š š š{
š š š š š š š š š šfastcgi_pass šbackend;
š š š š š š š š š šfastcgi_index index.php;
š š š š š š š š š šinclude fastcgi_params;
š š š š š š š š š šfastcgi_param SCRIPT_FILENAME
/var/www/site/index.php;
š š š š š š š š š šfastcgi_param š DOCUMENT_URI š š š /index.php$uri;
š š š š š š š š š šaccess_log off;
š š š š š š š š}

š š š š}
}
[/code]
ðÒÏÂÌÅÍÁ × ÔÏÍ,ÞÔÏ ËÁÒÔÉÎËÉ ÌÅÖÁÔ ×
ÇÁÌÅÒÅÅ /gallery/view/ ÎÁÖÉÍÁÑ ÎÁ ËÁÒÔÉÎËÕ
ÐÏÌÕÞÁÀ /view/1?img=123 É ÏÎÁ ÎÅ
ÏÔËÒÙ×ÁÅÔÓÑ.óÏÏÔ×ÅÔÓÔ×ÅÎÎÏ /view/1?img=123
ÒÁÚÎÙÅ,ÄÌÑ ËÁÖÄÏÊ ÇÁÌÅÒÅÉ É ËÁÒÔÉÎËÉ
Ó×ÏÉ.
ôÁË ÖÅ ÄÏ ËÏÎÃÁ ÎÅ ÚÁÇÒÕÖÁÀÔÓÑ
ÓÔÒÁÎÉÃÙ.ïÔÒÅÚÁÀÔÓÑ × ÒÁÎÄÏÍÎÏÍ
ÐÏÒÑÄËÅ,ÎÅ ÚÁÇÒÕÚÉ×ÛÉÓØ ÐÏÌÎÏÓÔØÀ.

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,144305,144305#msg-144305


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.