其实两者有什么区别呢?我的网站可以正常工作:
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
Run Code Online (Sandbox Code Playgroud)
但是我看到互联网上的一些指南也将片段添加到上面的代码中,例如:
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;
}
Run Code Online (Sandbox Code Playgroud)
但我看到该片段还包含 fastcgi.conf 。那么为什么我们要添加 include fastcgi.conf 呢?
该代码片段比 fastcgi.conf 还能做什么?
| 归档时间: |
|
| 查看次数: |
1124 次 |
| 最近记录: |