Bluetom

mac下手工配置nginx、php-fpm

mac自带的php版本略老,

apache太吃内存,跑起百来M,nginx 10+M就够了

索性把之前的全删了

brew install nginx

brew tap josegonzalez/homebrew-php

brew install mysql

brew install phpmyadmin

cd /usr/local/etc/nginx/

sublim nginx.conf

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        root   /usr/local/var/www;
        index  index.html index.htm index.php;
   }
    location ~ \.php$ {
        fastcgi_pass   unix:/usr/local/var/run/php-fpm.socket;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

php改为socket连接

配置好phpmyadmin

create new Server

3306配置就搞定

Bluetom

作为挨踢业的前段湿 搬过砖也画过画:爱看、爱听、爱玩儿、爱折腾、爱打撸啊撸、intj

Proudly published with Hexo