可以参考这篇文章安装:
https://www.sylvaindurand.org/setting-up-a-nginx-web-server-on-macos/
http://www.jianshu.com/p/ae3f88d52e21
https://gist.github.com/petemcw/9265670
服务重启:
brew services restart php71
日志文件目录:
/usr/local/var/log/
配置文件目录:
/usr/local/etc/
Nginx 的配置:
user marvin staff;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name www.darwin.com;
root /Users/marvin/Documents/workspace/laravel/DarwinWeb/public;
location / {
index index.php;
try_files $uri $uri/ /index.php;
}
location ~ \.php {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
}
网友评论