文、意如
伺服器架好後,輸入localhost ,或127.0.0.1 ,可以導到預設的本機端首頁,

接下來要把localhost,改成我們的域名yiru.com
開啟終端機→編輯
sudo vi etc/hosts
在 hosts 檔案中,找到一行以 127.0.0.1
開頭的記錄,通常是 127.0.0.1 localhost
。

在該行的結尾加入你想要的域名,例如:
127.0.0.1 localhost yiru.com

這樣就將 yiru.com
指向了本機的 IP 地址 127.0.0.1

Yiru@Studio - 關於我 - 意如