一:首先熟悉幾個命令
which php????? --->? which是通過 PATH環境變量到該路徑內查找可執行文件,所以基本的功能是尋找可執行文件
whereis php?? ----> 將和php文件相關的文件都查找出來
service php-fpm/nginx/mysqld? restart? 重啟服務
二:找到nginx的配置文件nginx.conf
#find / -name nginx.conf
找到路徑為:/etc/nginx/nginx.conf
二:找ngin默認虛擬主機的配置
#find / -name default.conf
# cd /etc/nginx/conf.d
#cp default.conf? host1.conf? (nginx下每一個虛擬主機是一個配置文件,配置多個虛擬主機需要新建多個文件)
這個兩處地方需要改就可以了
三:在本地下改hosts
可以顯示? 配置設置的有index.php可以顯示 其他沒有目錄列表顯示這一項
?