MAC OS Nginx php-fpm相关

Nginx 命令

sudo nginx // 启动Nginx

#重新加载|重启|停止|退出

sudo nginx -s reload|reopen|stop|quit

 

#上传文件限制更改:

进入nginx.conf

client_max_body_size 50M;
client_body_temp_path /tmp;

再修改php.ini

post_max_size = 50m

upload_max_filesize = 50m

max_execution_time = 600

max_input_time = 600

php.ini和nginx.conf的文件大小限制最好一样

php-fpm命令

sudo service php56-fpm stop

sudo service php56-fpm start

sudo service php56-fpm restart

 

或者进入/usr/local/opt/php56/sbin

执行sudo php56-fpm restart

 

php.ini/php-fpm.conf路径 : /usr/local/etc/php/5.6

 

 

Apache停止开始启动命令

 

打开终端

重启apache:sudo /usr/sbin/apachectl restart

关闭apache:sudo /usr/sbin/apachectl stop

开启apache:sudo /usr/sbin/apachectl start

 

Apache log path:

/private/var/log/apache2/

-----------------------------

php ini 5.6path: /usr/local/etc/php/5.6/php.ini

apache config path: /etc/apache2/httpd.conf

 --------------------------------------------------------------

brew 安装好mysql之后提示ERROR 2002 (HY000): Can't connect to local MySQL server through socket '

之后命令行执行一下brew info mysql来进行自动配置, 然后就可以启动了

mysql.server start

 --------------------------------------------------------------

 

 

好文章:

解决phpinfo 和 php -v版本不对问题

http://segmentfault.com/q/1010000000308315

  

http://ju.outofmemory.cn/entry/121119

http://blog.liuweifeng.net/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/

http://www.cnblogs.com/caowei/p/mac-path_2013-08-26.html

http://www.sundabao.com/mac-os-x-mavericks-or-yosemite-%E5%AE%89%E8%A3%85nginx%E3%80%81php%E3%80%81mysql%E3%80%81phpmyadmin/

 http://jvdc.me/fix-502-bad-gateway-error-on-nginx-server-after-upgrading-php/

http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/

posted @ 2015-04-19 13:58  derrck  阅读(811)  评论(0编辑  收藏  举报