Cannot change default root path

Igor Sysoev is at rambler-co.ru
Thu Feb 26 09:27:47 MSK 2009


On Wed, Feb 25, 2009 at 11:38:22PM +0100, Y. Yaax wrote:

> Actuall now I found this problem is only happens with my php files.
> For other non php files all paths are working ok.
> For example this config is working properly:
> location / {
>             index index.html index.php;
>             root  /home/user/public_html;
>         }
> 
> but this one not working:
> 
> location ~ \.php$ {
>         fastcgi_pass   127.0.0.1:10000;
>         fastcgi_index  index.php;
>         fastcgi_param  SCRIPT_FILENAME 
> /home/user/public_html$fastcgi_script_name;
>         include        /usr/local/nginx/conf/fastcgi_params;
>   }
> 
> On this config all non-php files are served correctly from correct 
> locations, but php files are getting error 404 file no found.
> But when I setup nginx default path as /usr/local/nginx/html - then even 
> php working properly.
> 
> So what can be problem with this fastcgi config?

Where you .php files are located ?
This configuraiton try to execute them as

/home/user/public_html/...


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list