Welcome! Log In Create A New Profile

Advanced

Strange rewrite behaviour

March 14, 2011 11:42AM
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
Subject Author Posted

Strange rewrite behaviour

aecon March 14, 2011 11:42AM

Re: Strange rewrite behaviour

Francis Daly March 14, 2011 12:52PM

Re: Strange rewrite behaviour

aecon March 14, 2011 01:22PM

Re: Strange rewrite behaviour

Francis Daly March 14, 2011 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 175
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready