
1.首先看了nginx報錯日志
報 signal process started


signal process started表示還有
產生原因
1、可能你的nginx.conf 內容配置的有問題。
2、./nginx -r reload 啟動命令默認加載的nginx.conf 的路徑不對。
之前還以為本地安裝的nignx端口號沖突了呢,結果不是
是配置的問題;
假如mac安裝的nignx和集成環境mamp端口號重復了,
可以修改配置文件nginx.conf中端口號來解決
也可以停掉你不需要的那個nignx服務
使用命令行
sudo nginx -s stop
nginx不像apache那樣能識別.haccess文件,
需要配置,加以下語句加到nginx配置下
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}


重啟nginx服務
再次執行http://tp5.test.com:7888/index/index/hi
結果依然報錯
報404,我的內心是崩潰的
繼續排查
發現 原來mamp pro中的配置文件 最后都會到 目錄
/Library/Application Support/appsolute/MAMP PRO/conf/

打開配置文件
發現虛擬站點tp.test5.com那里並沒有配置上剛剛的語句
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}

再次配置 在配置虛擬站點位置處配置

配置好后應該是這樣的,注意 TP5項目的根目錄為/Applications/MAMP/htdocs/tp5/public

再次運行 ok了

http://tp5.test.com:7888/index/goodsclass/classlist

