Nginx error message: rewriteorinternalredirectioncyclewhileinternallyredirectingto "/",

Source: Internet
Author: User
: This article describes how to solve the nginx error: rewriteorinternalredirectioncyclewhileinternallyredirectingto. if you are interested in the PHP Tutorial, refer to it. Configure nginx + php-fpm and access the home page. an error is returned:

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"

Cause of error: caused by the index command. the solution is to change try_files $ uri/; to try_files $ uri/= 404;

Note: No space is allowed between the equal sign of = 404 and 404.

Complete configuration: bk. conf source code is as follows (if you need to reprint, please mark the original author default.fu@foxmail.com ):

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;}}

The above describes how to solve the nginx error prompt: rewrite or internal redirection cycle while internally redirecting to "/", including some content, hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.