Strange rewrite behaviour

Alexander Economou aecon at sysadm.gr
Mon Mar 14 20:19:04 MSK 2011


Thank you for your quick reply again Francis.

I followed your instructions and made the following changes

---------------------------------------------------------------------------
#           root 
/var/www/cluster-domains/2_socialwhale_com/htdocs/website;
---------------------------------------------------------------------------

Commented the above line since i have already set the root dir

---------------------------------------------------------------------------
             fastcgi_pass   127.0.0.1:9000;
             fastcgi_index  index.php;
#           fastcgi_param  SCRIPT_FILENAME 
/var/www/cluster-domains/2_socialwhale_com/htdocs/website/$fastcgi_script_name;
---------------------------------------------------------------------------

Commented SCRIPT_FILENAME and added the line below :

---------------------------------------------------------------------------
             include        fastcgi.conf;
---------------------------------------------------------------------------

As for the authentication part now , the following works as a charm on a 
cacti installation but not in the specified virtualhost (2.socialwhale.com)


location /var/www/html/cacti {
     auth_basic            "Restricted";
     auth_basic_user_file  /var/www/html/cacti/.htpasswd;
     }


As for the rewrite rule i tried your recommendation like below :

---------------------------------------------------------------------------
location / {
     try_files $uri $uri/ /index.php?$uri&$args;
  	}
---------------------------------------------------------------------------

but still php-cgi does not respond to any .php and after some minutes i 
get 402 gateway error.




-- 
---
Alex



More information about the nginx mailing list