fastcgi.conf; vs fastcgi-php.conf片段?

时间:2017-12-28 09:28:38

标签: php nginx fastcgi

实际上两者之间有什么区别?我的网站运行良好:

  location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
  }

但是我发现互联网上的一些指南也会将代码段添加到上面的代码中,例如:

  location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        include snippets/fastcgi-php.conf;
}

但是我看到片段里面还包含了fastcgi.conf。那么我们为什么要添加include fastcgi.conf?

与snippet相比,fastcgi.conf的功能更多?

0 个答案:

没有答案