Cannot change default root path

Y. Yaax lists at ruby-forum.com
Thu Feb 26 14:18:29 MSK 2009


Igor Sysoev wrote:
> On Thu, Feb 26, 2009 at 11:11:52AM +0100, Y. Yaax wrote:
> 
>> > 
>> > /home/user/public_html/...
>> 
>> php files are located in this folder /home/user/public_html/ - in fact 
>> they are served correctly by apache from same folder on another port. 
>> But fastcgi cannot find them, there...
> 
> Could you show the full server configuration ?

server {
        listen          ip:80;
        server_name     domain.com;

        error_log  logs/vhost-error_log warn;

        root  /home/user/public_html;
        location / {
            index index1.html;
            root  /home/smf4u/public_html;
        }

        location ~ \.php$ {
                root  /home/user/public_html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param SCRIPT_FILENAME 
$document_root$fastcgi_script_name;
            #fastcgi_param  SCRIPT_FILENAME 
/home/user/public_html$fastcgi_script_name;
            include        /usr/local/nginx/conf/fastcgi_params;
        }
    }

I tried both ways fastcgi_param  SCRIPT_FILENAME 
/home/user/public_html$fastcgi_script_name; and fastcgi_param 
SCRIPT_FILENAME $document_root$fastcgi_script_name;
 - both ways have same error file not found.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list