Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created September 27, 2012 12:13
Show Gist options
  • Save jugyo/3793680 to your computer and use it in GitHub Desktop.
Save jugyo/3793680 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