<a href="http://lucifr.com/2012/07/28/apache-and-web-sharing-on-osx-10_8-mountain-lion/#"></a>
<a href="http://lucifr.com/">Home</a>
<a href="http://lucifr.com/archives">Archives</a>
<a href="http://lucifr.com/about">About</a>
<a href="http://feed.lucifr.com/">SUBSCRIBE</a>
更新到
Mountain Lion 後發現 pac 檔案不起作用,檢查一番後發現“Web
Sharing”這個選項幹脆從 System
Preferences > Sharing 中消失了,這讓一直用
Apache/Web Sharing 的方法:
使用以下指令可以對 Apache 進行相應的操作:
啟動:
停止:
重新開機:
檢視
Apache 版本:
ML
中安裝的 Apache 版本是 2.2.22。
works!”就說明成功了。
看看 username.conf 檔案是否存在:
如果沒有見到你的使用者名命名的 .conf 檔案,那麼就需要手動建立一個:
注意你需要把 username 換成你的使用者名;另外 Lucifr 這裡用的是 vi 來進行編輯,當然也可以用
nano。
粘貼以下内容,同樣注意替換你的使用者名:
儲存退出後重新開機下 Apache: