drupal try_files php fastcgi

Mark Alan varia at e-healthexpert.org
Mon Mar 16 23:42:34 MSK 2009


Igor Sysoev wrote:
> Probably, you can use omit @fallback:
> 
> location / {
>     try_files      $uri  $uri/  /index.php?q=$request_uri;
> }
> 
> location ~ \.php$ {
>     try_files      $uri  /index.php?q=$request_uri;
>     ...
> }

==> System: Drupal 6.10 + Ubuntu 8.10

==> Using:
(...)
	listen clinica.0:80;
	server_name clinica.0;
	root /var/www/drupal-cgm;
(...)
	location / {
		try_files $uri $uri/ /index.php?q=$request_uri;
	}

	location ~ \.php$ {
		try_files $uri /index.php?q=$request_uri;
		include /etc/nginx/fastcgi_params;
		fastcgi_pass unix:/tmp/php-fastcgi.socket;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	}


==> going to: http://clinica.0/index.php
Gets to Drupal's intro page but, clicking
at the login button gets a "500 Internal Server Error" and the error log:
"2009/03/16 20:30:25 [error] 11343#0: *3 rewrite or internal redirection 
cycle while internal redirect to "/index.php?q=/node?destination=node", 
client: 127.0.0.1, server: clinica.0, request: "POST 
/node?destination=node HTTP/1.1", host: "clinica.0", referrer: 
"http://clinica.0/index.php""

==> going to: http://clinica.0/
gives a "403 Forbidden" and the error log:
"2009/03/16 20:34:04 [error] 11343#0: *4 directory index of 
"/var/www/drupal-cgm/" is forbidden, client: 127.0.0.1, server: 
clinica.0, request: "GET / HTTP/1.1", host: "clinica.0""

==> going to: http://clinica.0/benchtest.php
correctly executes the php script

==> going to: http://clinica.0/test
Should give a "Page not found", but instead gives: "500 Internal Server 
Error" and the error log:
2009/03/16 20:39:14 [error] 11343#0: *15 rewrite or internal redirection 
cycle while internal redirect to "/index.php?q=/test", client: 
127.0.0.1, server: clinica.0, request: "GET /test HTTP/1.1", host: 
"clinica.0"

--
M.





More information about the nginx mailing list