Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nginx ÎÅ ÏÔÒÁÂÁÔÙ×ÁÅÔ ÒÅ×Ò ÁÊÔ
- To: nginx-ru@xxxxxxxxx
- Subject: Re: Nginx ÎÅ ÏÔÒÁÂÁÔÙ×ÁÅÔ ÒÅ×Ò ÁÊÔ
- From: Alexander Kochetov <kochetov.alexander@xxxxxxxxx>
- Date: Fri, 4 Dec 2009 19:13:16 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=1COUOG1ZW0GF1M4q0LDBFf8D4S2l6zs9P3PsMCnOgdE=; b=NqvnxKYR+0PUiaYGnuIOYHetUOWTHnKAcE0F9Faf4xbnZqO5x2j+R+s1vHebZuH37V DuBoSK4a9hWvf1+dtjYH13Pb9WqwJwENZDpksaKhfy6sEEWCr/VEWH4LR6sDlhF2lXsD DtQf1g3c1SmHREi0rb9P8ytcM2ZhWBZRrhfm0=
- 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:content-transfer-encoding; b=ChlqGC984eQAJb66Um9HSTQ/f2XlANUYb4DR3la6xOmYOy/MzB0nGxMKx27aKv2tQz pfiYUbKjFk2RDgGlgKoJJJ9a21RVRU/fnEjOG20ZfcKsLI1Xeq1W5UueoEMOk9xCNsXn ybP27yS2r/O+0WsKPTJ8nauorY4oT5N4+Eh1w=
- In-reply-to: <1c28bdbbec166cb4a2437fbdb2021b05.NginxMailingListRussian@xxxxxxxxxxxxxxx>
- References: <1c28bdbbec166cb4a2437fbdb2021b05.NginxMailingListRussian@xxxxxxxxxxxxxxx>
á ËÕÄÁ ÏÎ ÄÏÌÖÅÎ ÌÅÚÔØ? õ ×ÁÓ root ÎÅ ÏÐÒÅÄÅÌÅÎ, ÎÉ × server, ÎÉ × location /my/
úÁ ÜÔÏ:
if (!-e $request_filename)
{
rewrite ^/$ /my/ permanent;
}
×ÁÓ ÓÅÊÞÁÓ ÎÁÞÎÕÔ ÚÄÅÓØ ÒÁÓÐÉÎÁÔØ.
--
Alexander Kochetov
4 ÄÅËÁÂÒÑ 2009 Ç. 18:27 ÐÏÌØÚÏ×ÁÔÅÌØ 100matolog <nginx-forum@xxxxxxxx> ÎÁÐÉÓÁÌ:
> ÐÅÒÅÄÅÌÙ×ÁÀ ÉÚ ÁÐÁÞÅ×ÓËÏÇÏ ËÏÎÆÉÇÁ × nginx ( ÒÅ×ÒÁÊÔÏ× ÎÅÍÅÒÑÎÏ)
> ÈÏÞÕ ÓÄÅÌÁÔØ ËÒÁÓÉ×ÙÊ ÞÐÕ-ÛÎÙÊ ÁÄÒÅÓ. ÔÏÂÉÛØ šhttp://fpm.test.ru/my/
> ËÏÎÆÉÇ
>
> fpm# cat nginx.conf
> user šwww www;
> worker_processes 100;
> worker_priority -5;
> worker_rlimit_nofile 51200;
>
> events {
> š šworker_connections š51200;
> š šuse š š š š š š š š kqueue;
> }
>
> http {
> š šinclude š š š š š š mime.types;
> š šdefault_type š š š šapplication/octet-stream;
>
> š šlog_format šmain š š'$remote_addr - $remote_user [$time_local] $request '
> š š š š š š š š š š š š'"$status" $body_bytes_sent "$http_referer" '
> š š š š š š š š š š š š'"$http_user_agent" "$http_x_forwarded_for"';
>
> š šserver_names_hash_bucket_size š š š 512;
> š šsendfile š š š š š šon;
> š štcp_nopush š š š š šon;
> š škeepalive_timeout š 70 30;
> š šsend_timeout š š š š30s;
> š šreset_timedout_connection š on;
> š šresolver š š š š š š127.0.0.1;
> š šresolver_timeout š š10s;
>
> š šopen_file_cache š š š š š š max=100000 inactive=40s;
> š šopen_file_cache_valid š š š 60s;
> š šopen_file_cache_min_uses š š2;
> š šopen_file_cache_errors š š šon;
>
>
> ########################SERVER_LOCALHOST##############################
>
> š šserver {
> š š š šlisten š š š š š80;
> š š š šserver_name š š fpm.test.ru;
> š š š šclient_max_body_size 101M;
> š š š šlocation / {
> š š š š š šroot š š š š/usr/local/www/della/htdocs/;
> š š š š š šindex š š š index.html, index.php ;
> š š š š š šaccess_log /var/log/nginx/localhost-access.log š š šmain;
> š š š š š šerror_log /var/log/nginx/localhost-error.log š š š šerror;
>
> š š š š š š š š š }
>
> #####################################################################
> ################## š š šREWRITE š š š š š š š š #####################
>
> š šlocation /my/ š š š {
> š š š š š š š š š š š šif (!-e $request_filename)
> š š š š š š š š š š š š{
> š š š š š š š š š š š šrewrite ^/$ /my/ permanent;
> š š š š š š š š š š š š}
> š š š š š š š š š š š š}
>
> ################### š š š PHP-FPM š š š š š š š######################
>
>
> location ~* \.php$ {
> š š š š š šfastcgi_pass š š š š127.0.0.1:9000;
> š š š š š šfastcgi_index š š š index.php;
> š š š š š šfastcgi_param š š š SCRIPT_FILENAME š
> /usr/local/www/della/htdocs/$fastcgi_script_name;
> š š š š š šinclude š š š š š š fastcgi_params;
> š š š š}
>
>
> error_page š š š500 502 503 504 š š š š /50x.html;
> š š š šlocation = /50x.html {
> š š š š š šroot š š š š/usr/local/www/nginx-dist;
> š š š š}
> }
>
> }
>
>
> ÎÅ ÏÔÒÁÂÁÔÙ×ÁÅÔ - ÒÕÇÁÅÔÓÑ ÎÁ 404 Not Found
> × ÌÏÇÁÈ
>
> 2009/12/04 17:19:35 š45276#0: *7 "/usr/local/etc/nginx/html/my/index.html" is
> not found (2: No such file or directory), client: 10.100.101.14, server:
> fpm.test.ru, request: "GET /my/ HTTP/1.1", host: "fpm.test.ru", referrer:
> "http://fpm.test.ru/"
>
>
> ÚÁ ËÁËÉÍ ÂÏÌÔÏÍ ÏÎ ÌÅÚÅÔ × ÄÉÒÅËÔÏÒÉÀ "/usr/local/etc/nginx/html/my/....
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,27971,27971#msg-27971
>
>
> _______________________________________________
> 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
|