|
|
|
|
áòèé÷ :: nginx-ru
|
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ÂÁÇÁ ÉÌÉ ÆÉÞÁ?
- To: nginx-ru@xxxxxxxxx
- Subject: Re: ÂÁÇÁ ÉÌÉ ÆÉÞÁ?
- From: îÉËÉÔÁ ëÏÚÌÏ× <niakrisn@xxxxxxxxx>
- Date: Fri, 24 Sep 2010 18:27:02 +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=HTlyxMGqeN8bsx/hgrxxdp/LHcb/FCP/JyLEeomYI2s=; b=AbEPU6eIDCBstsbl0A5Oq68KGJw1tuBaf9eFzBZTIiV1jSAc7xDf+9MBYCf9zlx54h 4YoU9VmCRqsmU67McnoggstSn4lmUpQjTSwMOVZ1h3D6vAczrddAzlHIA+x4Asuehxlc 2wmAGrPBoAwxujyapriI7liLBMBXV4EhVYflQ=
- 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=i8ifOvD7CBMVcFuzzKy/BhhfBaeinOk+bg7LZJmQjKUs8NTYpW9QDvRYiUwK8c5TOT KVDeNJWDL7zfCTwhiieZhirYPuoY9HqLbEDSW5F/g3Q2I0pdLqso4wOmyJuiBdd+loLf 3nzQh5/o/EXdljWLpe1+DdhK+0uXRg5Qx0MJI=
- In-reply-to: <84e9b3f2e237b63f79072bb34f495989.NginxMailingListRussian@xxxxxxxxxxxxxxx>
- References: <84e9b3f2e237b63f79072bb34f495989.NginxMailingListRussian@xxxxxxxxxxxxxxx>
íÏÖÅÔ ÜÔÏ Ó×ÑÚÁÎÏ Ó ÐÒÁ×ÁÍÉ nginx ÎÁ ËÁÔÁÌÏÇ ÇÄÅ ÈÒÁÎÉÔÓÑ ËÜÛ?
24 ÓÅÎÔÑÂÒÑ 2010šÇ. 17:59 ÐÏÌØÚÏ×ÁÔÅÌØ Dmitry Veselov <nginx-forum@xxxxxxxx> ÎÁÐÉÓÁÌ:
éÎÔÅÒÅÓÎÙÊ ÍÏÍÅÎÔ, ÞÔÏ ÅÓÌÉ ×ÍÅÓÔÏ
location ~* \.(css|flv|gif|html|jpg|js|png|swf|xml)$ {
ÐÏÓÔÁ×ÉÔØ
location / {
ôÏ ÅÓÔØ, ËÜÛÉÒÏ×ÁÎÉÅ ×ÓÅÇÏ ÓÒÁÚÕ, ÔÏ
ÏÔ×ÁÌÉ×ÁÀÔÓÑ ÉÎÄÅËÓÎÙÅ ÆÁÊÌÙ index.html, É
nginx ×ÙÄÁÅÔ ÏÛÉÂËÕ 403 ÐÒÉ ÌÀÂÏÊ ÌÉÎËÅ
ÔÉÐÁ http://www.bla-bla.com/link/ ÄÁÖÅ ÅÓÌÉ ÅÍÕ
ÐÒÏÐÉÓÁÔØ × ËÏÎÆÉÇÕÒÁÃÉÉ ÄÉÒÅËÔÉ×Õ index
index.html
[b]ðÒÉÔÏÍ ÐÒÏÉÓÈÏÄÉÔ ÜÔÏ ÎÅ ÓÒÁÚÕ, Á
ÞÅÒÅÚ ÎÅÓËÏÌØËÏ ÍÉÎÕÔ ? ×ÏÚÍÏÖÎÏ ËÏÇÄÁ
ÕÓÔÁÒÅ×ÁÅÔ ËÜÛ.[/b]
×ÏÔ ËÏÎÆÉÇ:
[code]
server {
š šlisten š80;
š šserver_name bla-bla.com www.bla-bla.com;
š šlocation ~* \.(css|flv|gif|html|jpg|js|png|swf|xml)$ {
# š šlocation ~* \.(css|gif|html|jpg|png|swf|xml)$ {
š š š šroot /var/cache/nginx/$server_name;
# š š š expires šmax;
š š š šexpires š1m;
š š š šopen_file_cache_errors šoff;
š š š šerror_page 404 = @fetch;
š š š šaccess_log š š š š š š š/var/log/nginx/bla-bla.com.access.log;
š š š šerror_log š š š š š š š/var/log/nginx/bla-bla.error.log error;
š š}
š šlocation @fetch {
š š š šinternal;
š š š šproxy_pass š š š š š š šhttp://1.2.3.4;
š š š šproxy_store š š š š š š on;
š š š šproxy_store_access š š šuser:rw šgroup:rw šall:r;
š š š šproxy_temp_path š š š š /var/nginx/proxy_temp;
š š š šproxy_set_header š š š šHost š š š š š š $host;
š š š šproxy_set_header š š š šX-Real-IP š š š š$remote_addr;
š š š šroot /var/cache/nginx/$server_name;
š š š šaccess_log š š š š š š š/var/log/nginx/bla-bla.com.access.log;
š š š šerror_log š š š š š š š/var/log/nginx/bla-bla.com.error.log
error;
š š}
š šlocation / {
š š š šproxy_pass š š š š šhttp://1.2.3.4/;
š š š šaccess_log š š š š š š š/var/log/nginx/bla-bla.com.access.log;
š š š šerror_log š š š š š š š/var/log/nginx/bla-bla.com.error.log
error;
š š š šinclude š š š š š š /etc/nginx/proxy.conf;
š š}
}
[/code]
[code]
nginx version: nginx/0.7.67
[/code]
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,133570,133570#msg-133570
_______________________________________________
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
|
|
|