简单记录PHP-NGINX的配置流程

配置php-fpm.conf

sudo vim /private/etc/php-fpm.conf

重启 php-fpm

ps -ef | grep php-fpm sudo killall php-fpm

sudo php-fpm

配置nginx

cd /usr/local/etc/nginx/ vim nginx.conf

location / { root html; index index.html index.htm index.php; } location ~ .php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }

/usr/local/etc/nginx/nginx.conf (配置文件路径) /usr/local/var/www (服务器默认路径) /usr/local/Cellar/nginx/1.6.2 (貌似是安装路径)

启动nginx

nginx nginx -s stop nginx -s reload

配置host

vim /etc/hosts

http://www.4wei.cn/archives/1002061

https://gitee.com/dogstar/PhalApi-Api-Admin

http://ruilin.admin.okayapi.com/ http://ruilin.admin.okayapi.com/index.php?r=user/login http://ruilin.admin.okayapi.com/index.php?r=systemSettings/index http://ruilin.admin.okayapi.com/index.php?r=user/admin/view&id=2693

http://ruilin.admin.okayapi.com/?r=Data/MyModelsManager&___ddd___=1