我正在将我的服务器从lighttpd迁移到nginx,在lighttpd中,我曾经将快速cgi配置放在一个名为fastcgi.conf的文件中 . 由于我有多个子域,我是否需要为nginx中的每个虚拟主机提供所提到的配置 .
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fpm.sock;
并重新启动nginx和php-fpm的服务 .
1 回答
首先你错过了
}
如果要包含此块,可以将其放在任何文件_742506中,并使用普通包含在vhost中 .