将nginx配置文件中的两个location合并成一个 就好了。

server {

    listen      ******;
    listen       *****;
    server_name  ****;
    root         /*****;

   

   location / {
        index index.php index.html index.htm;
    }
    
    location ~ .php$ {
      *********
    }

location / { 这个注释掉,即可

}

    error_page 404 /404.html;
        location = /40x.html {
    }

更多推荐