php nginx 重定向循环,php – Nginx重写或内部重定向循环,同时内部重定向到“/index.html”...

我使用Php框架在没有任何index.html的情况下在nginx上实现web服务器,网页工作正常,但是有些脚本不工作,它说“500内部服务器错误”

这是服务器日志

2016/11/16 11:08:38 [error] 2551#0: *738 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /kelontong/getKelontong HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:09:20 [error] 2551#0: *746 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /kelontong/getKelontong HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:14:47 [error] 5500#0: *4 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /department/ HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:14:48 [error] 5500#0: *6 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /department/getdepartment HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:18:56 [error] 5518#0: *4 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /department/getdepartment HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:18:56 [error] 5520#0: *8 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /department/getdepartment HTTP/1.1”, host: “192.168.70.86”

2016/11/16 11:21:35 [error] 5534#0: *3 rewrite or internal redirection cycle while internally redirecting to “/index.html”, client: 27.131.251.6, server: www.foreverstore.id, request: “GET /department/getdepartment HTTP/1.1”, host: “192.168.70.86”

这是我的nginx主机配置文件

server {

listen 443 ssl http2;

root /bwi/foreverstore.id;

index index.html index.htm index.php;

server_name www.foreverstore.id ;

ssl_certificate /etc/nginx/ssl/foreverstore.crt;

ssl_certificate_key /etc/nginx/ssl/foreverstore.key;

location / {

try_files $uri $uri/ /index.html;

# try_files $uri $uri/ =404;

# Uncomment to enable naxsi on this location

# include /etc/nginx/naxsi.rules

}

location /doc/ {

alias /usr/share/doc/;

autoindex on;

allow 127.0.0.1;

allow ::1;

deny all;

}

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root /usr/share/nginx/www;

}

location ~ \.php${

fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

fastcgi_intercept_errors on;

fastcgi_param MAGE_RUN_CODE default;

fastcgi_param MAGE_RUN_TYPE store;

}

}

如果你们知道如何解决这个问题,我将非常感谢你们

干杯.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值