mac nginx php php-fpm

#the php-fpm config and cammand...php

cp /private/etc/php-fpm.conf.default /usr/local/etc/php-fpm.confnginx

php-fpm --fpm-config /usr/local/etc/php-fpm.conf --prefix /usr/local/vargit

ps aux | grep 'php-fpm'github

killall -HUP php-fpmredis

 

#the nginx config and cammand...apache

brew services restart nginxvim

fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
=====>
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;app

 

能够在你的location php 里面添加当文件不存在时返回404而不是交给php-fpm进行处理php-fpm

location ~ \.php$
{
...
#文件不存在转404
try_files $uri = 404;
...
}post

而后,在你的配置文件中找到下面这段

fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;

相关文章
相关标签/搜索