解决nginx 报错提示:rewrite or internal redirection cycle while internally redirecting to "/",

配置好nginx+php-fpm,访问首页,提示报错:

2015/01/14 23:04:39 [error] 10964#2788: *2 rewrite or internal redirection cycle while internally redirecting to "/", client: 127.0.0.1, server: bk, request: "GET / HTTP/1.1", host: "bk"

报错原因:index 指令导致,解决方法 把 try_files $uri $uri/ ;改成 try_files $uri $uri/ =404;

特别注意:=404的等于号和404之间不能有任何空格。

完整配置:bk.conf源码如下(如需转载,请标注原作者 [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;
	}
}
时间: 2024-10-14 06:35:52

解决nginx 报错提示:rewrite or internal redirection cycle while internally redirecting to "/",的相关文章

Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500

错误提示为 /var/log/nginx/error.log Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500 找了好久,怎么改都是无限循环index/ 最后发现rewrite这样写就可以了 if (!-e $request_filename){ rewrite ^(.*)$ /index.php?q=$1 last; break; } Nginx 'rewrit

当nginx 500 伪静态错误时,记录解决方法rewrite or internal redirection cycle while processing

错误日志::rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/user/logout", client: 127.0.0.1, server: gaomysion.com, request: "G

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决

sqlplus连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0解决 sqlplus 连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0 问题描述: 使用sqlplus客户端登录数据库,报错SP2-0642,而使用其它方式plsql或者tnsnames等方式连接数据库均没有问题 [plain] [[email protected] ~

(已解决)Eclipse报错:Could not find XXX.apk. 没有Android项目命名. There is no android project named

可能是你把当前项目设置为library项目了,按以下步骤切换回普通项目: 选择 Project->Properties 在左边的列表中,选择 Android 取消钩中"Is Library" 复选框 报错提示: 解决办法:

eclipse里maven install时,报错提示jdk为无效的目标版本:1.7

http://blog.csdn.net/wabiaozia/article/details/51733372 ************************************ 报错提示: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project sshe: Compilation failure [ERR

nginx 报错 nginx: [emerg] could not build the variables_hash,

在nginx重启的时候报错了: nginx: [emerg] could not build the variables_hash, you should increase either variables_hash_max_size: 512 or variables_hash_bucket_size: 64 此时按照网上的修改 以下这些内容,根本没用! types_hash_max_size 2048;    server_names_hash_bucket_size 128; 还是别改这些

常量不加引号报错提示‘参数**没有默认值’

问:sql语句中常量不加引号报错提示'参数**没有默认值': 解决方法: 如下图所示加上英文状态下的引号:  字符串 要加上 单引号:''单引号 算一个 : 问:为何选中这列不需要加引号就能执行呢? 答: 选中那列 并非是 字符串列:数值列 不需要加 :

libc.so.6: version 'GLIBC_2.14' not found报错提示的解决方案

线上一台服务器在执行leveldb程序的时候,报错:"libc.so.6: version `GLIBC_2.14' not found". 排查原因及解决方法如下: 1)产生原因是由于Linux系统的glibc版本太低,而软件编译时使用了较高版本的glibc引起的! 查看系统glibc支持的版本 [[email protected] ~]# strings /lib64/libc.so.6 |grep GLIBC_ GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3

appium---from appium import webdriver报错提示“Unresolved import webdriver”

报错提示: from appium import webdriver提示Unresolved import webdriver 报错原因:没有安装Appium_Python_Client 解决办法: 终端执行: 第一种:pip install Appium_Python_Client 第二种:git clone https://github.com/appium/python-client.git 原文地址:https://www.cnblogs.com/syw20170419/p/890072