ПРОЕКТЫ 


  АРХИВ 


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: спрятать index.php



On Tue, Apr 12, 2011 at 09:59:08AM -0400, kirpich wrote:
> лучше покажу location корневой
> 
> 
>         location  / {
>             if ($request_filename != "index.php") {
>                 rewrite ^(.*)$ /index.php break;
>              }
> 
>             fastcgi_pass  phpfarm;
>             fastcgi_index  index.php;
>             fastcgi_param  SCRIPT_FILENAME 
> /home/vhost/site$fastcgi_script_name;
>             fastcgi_param  DOCUMENT_ROOT   /home/vhost/site;
>             include        /etc/nginx/fastcgi_params;
>             proxy_redirect off;
>             client_body_buffer_size 128k;
>             fastcgi_connect_timeout 300;
>             fastcgi_send_timeout 300;
>             fastcgi_read_timeout 300;
>             fastcgi_buffer_size     4M;
>             fastcgi_buffers         4 4M;
>             fastcgi_busy_buffers_size  8M;
>             fastcgi_temp_file_write_size 50M;
>             fastcgi_param   COBNUT_PATH     /home/vhost/Cobnut/;
>             fastcgi_param   SITE_PATH       /home/vhost/site/;
>             fastcgi_param   SITE_CONFIG_MAIN        config/conf.ini;
>             fastcgi_param   SITE_CONFIG_REWRITE     config/prod.ini;
>             fastcgi_param   SITE_NAME       site;
>             fastcgi_param   TMP     /home/vhost/site/tmp/;
>             fastcgi_temp_path /home/vhost/site/tmp/;
>             fastcgi_param   NGINX_UPLOAD_PROGRESS_URL      
> http://site_name/progress;
>             track_uploads proxied 30s;
>        }
> 
> nginx + php-fpm. 
> 
> Ваш вариант не подойдёт из за вот таких
> вот конфигов =(

location / {
    fastcgi_pass   phpfarm;
    fastcgi_param  SCRIPT_FILENAME /home/vhost/site/index.php
    fastcgi_param  PATH_INFO       $uri;
    root           /home/vhost/site;
    include        /etc/nginx/fastcgi_params;
    ...
}


-- 
Igor Sysoev

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


 




Copyright © Lexa Software, 1996-2009.