ðòïåëôù 


  áòèé÷ 


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: îÅ ÍÏÇÕ ÐÏÎÑÔØ ÇÄÅ try files ÉÝÅÔ ÆÁÊÌÙ


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: îÅ ÍÏÇÕ ÐÏÎÑÔØ ÇÄÅ try files ÉÝÅÔ ÆÁÊÌÙ
  • From: Yuriy Taraday <yorik.sar@xxxxxxxxx>
  • Date: Fri, 30 Jul 2010 06:48:10 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=B8MiUzAhdr5cHNhzxFBo/4OUFhvRxo++Sx+ToPkJHIw=; b=o9D2aHXBal/UaAruc3Niv1tfUo+6fIGJZHOs4Vd3ZEjn5BOcLzarAz5wxoHPSeWcKO osRCnbcO++XV+Xq0yuBqJ6zJU7mF9zbAymAKW/xVRR2vyuiViBiNbm//XVSeC6rzt2gJ ecxFaaUDJoKAjd3Elfq+pAkHoEX3jRKoxLvv4=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=OuLDsXmez573pZspJA/46302tgHZIL+iMUTmS+r/6FDHm0yP5QRAtE1ynjPNV9uvUJ FbNfTN3pj2gp63w5HHj6SocRhdhJrui2Ze32WmAqdweSBDnJen/Ej2B/4SaunGDRmMJM r2WmdDYwNX/RU5vL4Brvaqo8C8F2LlmQjcXWo=
  • In-reply-to: <ab6967c5c89471a73e72aeb74be4ebda.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <ab6967c5c89471a73e72aeb74be4ebda.NginxMailingListRussian@xxxxxxxxxxxxxxx>

try_files ÉÝÅÔ ÆÁÊÌÙ ÔÁÍ, ËÕÄÁ ÕËÁÚÙ×ÁÅÔ root ÉÌÉ alias. õ ×ÁÓ × location'Å Ó try_files ÎÅ ÕËÁÚÁÎÙ ÜÔÉ ÄÉÒÅËÔÉ×Ù. úÎÁÞÉÔ, ÉÝÅÔ ÏÎ × ËÏÒÎÅ×ÏÊ ÐÁÐËÅ ÐÏ ÕÍÏÌÞÁÎÉÀ, Ô.Å. ÞÔÏ-ÔÏ ×ÒÏÄÅ /usr/local/nginx/html.

2010/7/30 idrum <nginx-forum@xxxxxxxx>
óÅÒ×ÅÒ: nginx/0.7.67, php-fpm ,php 5.2.13, codeigniter. ëÕÄÁ
Ñ ÔÏÌØËÏ ÎÅ ÌÏÖÉÌ ÆÁÊÌ maintance.html, nginx ÎÅ
ÓÒÁÂÁÔÙ×ÁÅÔ É ÎÅ ÐÏËÁÚÙ×ÁÅÔ ÅÇÏ
ÓÏÄÅÒÖÉÍÏÅ. íÎÅ ËÁÖÅÔÓÑ ÐÏÔÏÍÕ ÞÔÏ ÎÅ
ÕËÁÚÁÎ root ÄÌÑ ÌÏËÁÃÉÉ / ÎÏ ÅÓÌÉ ÕËÁÚÁÔØ
ÒÕÔ ÔÏ nginx ×ÙÄÁ£Ô 403 ÏÛÉÂËÕ, ÅÓÌÉ ÖÅ
ÕËÁÚÁÔØ 'index index.php' ÔÏ nginx ÐÒÅÄÌÁÇÁÅÔ
ÓËÁÞÁÔØ ÆÁÊÌ index.php.

ëÏÎÆÉÇ:

[code]
user šwww;
worker_processes š1;
timer_resolution 100ms;
worker_rlimit_nofile 8192;
worker_priority -5;

pid š š š š š š /var/run/nginx.pid;

events {
š šworker_connections 2048;
š šuse kqueue;
}

http {
š šinclude š š š mime.types;
š šdefault_type šapplication/octet-stream;

š šsendfile š š š š š šon;
š štcp_nopush š š š š šon;
š štcp_nodelay š š š š on;
š škeepalive_timeout š 65;
š šserver_tokens š š š off;
š šclient_max_body_size 10M;
š šcharset š š š š utf-8;

š šupstream šbackend š{
š š š šserver unix:/tmp/fcgi.sock;
š š}

š šserver {
š š š šlisten š š š 80;
š š š šserver_name šsite.ru;


š š š šlocation / {

š š š š š šif ($host = 'www.site.ru' ) {
š š š š š š š šrewrite š^/(.*)$ šhttp://site.ru/$1 špermanent;
š š š š š š}

š š š š š štry_files /maintance.html $uri $uri/ @codeigniter;
š š š š}

š š š šlocation @codeigniter {
š š š š š šfastcgi_index index.php;
š š š š š šroot /home/site.ru/data/www/site.ru;
š š š š š šinclude /usr/local/etc/nginx/fastcgi_params_copy;

š š š š š šfastcgi_param šSCRIPT_FILENAME š$document_root/index.php;
š š š š š šfastcgi_param šQUERY_STRING š š $uri;

š š š š š šfastcgi_pass backend;
š š š š}


š š š šerror_page š404 š/404.html;

š š š šlocation /404.html {
š š š š š šroot
/home/site.ru/data/www/site.ru/system/application/views/errors/;
š š š š}

š š š šlocation ~* \.(jpeg|jpg|gif|png|css|js|ico)$ {
š š š š š šroot /home/site.ru/data/www/site.ru/system/application;
š š š š}
š š}
}
[/code]

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


_______________________________________________
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.