2011年3月14日星期一

Strange rewrite behaviour

Greetings again,

I got this weird problem. I have the following virtual domain configuration:


------------------------------------------------------------------------
server {
listen 80;
server_name 2.socialwhale.com;
access_log
/var/www/cluster-domains/2_socialwhale_com/logs/2.socialwhale.log main;
error_log
/var/www/cluster-domains/2_socialwhale_com/logs/2.socialwhale.err;
index index.html index.htm index.php;
root /var/www/cluster-domains/2_socialwhale_com/htdocs/website;


location ~ \.php$ {
root
/var/www/cluster-domains/2_socialwhale_com/htdocs/website;
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;
include fastcgi_params;
}

error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}


location /var/www/cluster-domains/2_socialwhale_com/htdocs/website {
auth_basic "Restricted";
auth_basic_user_file
/var/www/cluster-domains/2_socialwhale_com/htpasswd;
}


}

------------------------------------------------------------------------

Now if i add the following just after the error_page definition

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

Nginx says the configuration is ok but php-cgi crashes....

Just so you know i am using those lines to other virtual domains with no
problem.

Any ideas?

--
---
Alex

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

没有评论:

发表评论