安裝
使用 brew 安裝 Nginx。
| 1 | brew install nginx | 
啟動 Nginx 服務。
| 1 | sudo nginx | 
停止 Nginx 服務。
| 1 | sudo nginx -s stop | 
重啟 Nginx 服務。
| 1 | sudo nginx -s reload | 
站點
修改 /usr/local/etc/nginx/nginx.conf 檔的 fastcgi_param 參數:
| 1 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | 
在 /usr/local/var/www 目錄新增 index.php 檔:
| 1 | phpinfo(); |