1. 程式人生 > >mac 使用homebrew安裝lnmp

mac 使用homebrew安裝lnmp

ams 解決 127.0.0.1 usr inf oot -c oca index.php

1. brew install nginx 2. brew install php70 3. 配置Nginx ① 定義根目錄 root /usr/local/sk 將這一部分放到server塊裏面,去掉其他location塊裏面的root ② nginx + php 整合,只需將 location ~ \.php 這部分註釋去掉 開啟pathinfo模式 只需修改下面兩處 location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $1;
include fastcgi_params; } 關於path_info的配置,網上找了好久,一直沒解決,後來看了這哥們的博客終於搞定了,附個連接:http://blog.csdn.net/pangchengyong0724/article/details/51433440

mac 使用homebrew安裝lnmp