php - laravel cannot run after configuring nginx
天蓬老师
天蓬老师 2017-05-27 17:43:48
0
2
710
  1. ngixn配置

    server {

    listen       9000;
    server_name  localhost ;
    root   "/Applications/MAMP/htdocs/xx/xx/xx/public";
    location / {
        try_files $uri $uri/ /index.php?$query_string;
        index  index.html index.htm index.php;
        #autoindex  on;
    }
    location @rewrite {    
        rewrite ^/(.*)$ /index.php?_url=/;    
    } 
    

    }

2.报错如下:
rewrite or internal redirection cycle while internally redirecting to "/index.php",
client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost:9000", referrer: "http://localhost:9000/"

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
曾经蜡笔没有小新

The prompt is that a loopback address has been formed

Remove the second location and take a look

某草草

Replace the first try_files with this:

try_files $uri $uri/ /index.php?$query_string;

Try deleting the second one

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!