Configure the NGINX+PHP-FPM, visit the homepage, prompt error:
2015/01/14 23:04:39 [ERROR] 10964#2788: * * Rewrite or internal redirection cycle while internally redirecting to "/", Clie nt:127.0.0.1, SERVER:BK, Request: "get/http/1.1", Host: "BK"
cause of Error:index instruction, solution to try_files $uri $uri/; Change to Try_files $uri $uri/= 404;
Special Note:There can be no spaces between the =404 equals sign and 404.
Complete configuration: bk.conf source code as follows (if you need to reprint, please mark the original author [email protected]):
server {
listen 80;
server_name bk;
root d:/website/bk.com/www;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
try_files $uri =404;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root html;
#}
location ~ /\.(ht|svn|git) {
deny all;
}
}
Fix nginx error hint: rewrite or internal redirection cycle while internally redirecting to "/",