何はともあれインストール
brew install nginx
こんなエラー出たけど
Warning: /usr/local/sbin is not in your PATH
You can amend this by altering your ~/.bashrc file
おめぇのパスに無いよ、bashrcに追加しても可ってことなのでとりあえず無視。
パスが通ってないっててことで以下で起動。
/usr/local/Cellar/nginx/1.2.2/sbin/nginx
二回起動時のエラー↓
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
ふむ8080ポートで起動するんですね。
あれどうやって止める?
/usr/local/Cellar/nginx/1.2.2/sbin/nginx -s stop
みたいですね。
80ポートで起動に変えておこう。
vi /usr/local/etc/nginx/nginx.conf
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;