Skip to content

Instantly share code, notes, and snippets.

@sfelde
Forked from jugyo/mac_and_nginx.md
Created March 9, 2013 19:28
Show Gist options
  • Save sfelde/5125424 to your computer and use it in GitHub Desktop.
Save sfelde/5125424 to your computer and use it in GitHub Desktop.

Mac で Nginx

インストール

$ brew install nginx

インストールされる場所:

/usr/local/Cellar/nginx/1.2.4/

nginx.conf の場所

/usr/local/etc/nginx/nginx.conf

使い方

手動で start:

$ /usr/local/sbin/nginx

or

$ /usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx.conf

stop:

$ /usr/local/sbin/nginx -s quit

reload config:

$ /usr/local/sbin/nginx -s reload

test configuration and exit:

$ /usr/local/sbin/nginx -t

show version and configure options then exit:

$ /usr/local/sbin/nginx -V

debug ログを出力する

nginx の formula を開き

$ brew edit nginx

configure のオプションに --with-debug を追加して brew install nginx

ログは /usr/local/Cellar/nginx/1.2.4/logs/error.log に出力される。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment