ПРОЕКТЫ 


  АРХИВ 


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]

Nginx не отрабатывает реврай т



переделываю из апачевского конфига в 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


 




Copyright © Lexa Software, 1996-2009.