server {
listen 127.0.0.1:80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
location / {
root /usr/local/etc/nginx/html;
index index.php index.html index.htm;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log "/Users/youkaili/.config/valet/Log/nginx-error.log";
error_page 404 "/Users/youkaili/.composer/vendor/laravel/valet/server.php";
location ~ \.php$ {
root /usr/local/etc/nginx/html;
fastcgi_pass unix:/Users/youkaili/.config/valet/valet.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
主要就是配置fastcgi_pass php-fpm的位置在php-fpm.conf查询,如果没有去php.conf查找
|
请发表评论