Cannot change default root path

Y. Yaax lists at ruby-forum.com
Thu Feb 26 01:38:22 MSK 2009


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?
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list