3/21/2014

[MAC] 在 MAC 上安裝 nginx

安裝 Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
安裝 nginx
brew install nginx
讓 nginx 在登入時自動載入
ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents
立刻載入
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

sudo nginx
網頁根目錄
/usr/local/var/www
nginx 的設定檔
/usr/local/etc/nginx/nginx.conf
關掉 apache
sudo apachectl stop

沒有留言:

張貼留言