Re: свой root для опреденного урла
    georgiy_s 
    nginx-forum at nginx.us
       
    Wed Mar 12 11:25:51 UTC 2014
    
    
  
затрудняюсь ответить, вставили от безысходности. на данный момент добились
таких результатов:
создавая папку с таким же именем, как в location то всё работает, иначе не
работает.
сейчас конфиг такой:
    server {
	listen 80;
	server_name test.loc;
	root /var/www/test;
	
	error_log /var/log/nginx/mytest.log;
	index index.html index.php;
	
	location / {
	
	    index index.html index.php;
	    #try_files $uri $uri/ /index.php?$args;
	    set $root /var/www/test;
	}
	
	location /qqq {
	   
	    index index.html index.php;
	    #try_files $uri $uri/ /index.php?$args;
	    alias /var/www/test2;
	    
	    
	    location ~ \.php$ {
		include fastcgi_params;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_index index.php;
		fastcgi_param	PATH_TRANSLATED  $document_root$fastcgi_script_name;
		fastcgi_param	SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_pass   127.0.0.1:9000;
	    }
	}
	
	location ~ \.php$ {
  
	  include fastcgi_params;
	  fastcgi_param PATH_INFO $fastcgi_path_info;
	  fastcgi_index index.php;
	  fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_script_name;
	  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	  fastcgi_pass   127.0.0.1:9000;
	}
	
    }
по этому урлу http://test.loc/qqq/ сейчас ошибка "File not found."
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,248289,248299#msg-248299
    
    
Подробная информация о списке рассылки nginx-ru