Re: спрятать index.php

kirpich nginx-forum на nginx.us
Вт Апр 12 17:59:08 MSD 2011


лучше покажу 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. 

Ваш вариант не подойдёт из за вот таких
вот конфигов =(

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




Подробная информация о списке рассылки nginx-ru