2011年3月14日星期一

Re: Strange rewrite behaviour

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论