nginxインストールlog

最初にしたら、


$ brew install nginx
==> Installing nginx dependency: pcre
==> Downloading ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.

curl: (78) RETR response: 550
Error: Download failed: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.tar.bz2



エラーが出るのでupdateしました。



$ brew update
Initialized empty Git repository in /usr/local/.git/
remote: Counting objects: 53990, done.
remote: Compressing objects: 100% (24769/24769), done.
remote: Total 53990 (delta 34727), reused 45322 (delta 28505)
Receiving objects: 100% (53990/53990), 7.83 MiB | 339 KiB/s, done.
Resolving deltas: 100% (34727/34727), done.
From https://github.com/mxcl/homebrew
* [new branch] gh-pages -> origin/gh-pages
* [new branch] master -> origin/master
HEAD is now at b769471 uwsgi: remove verbose warning
Already up-to-date.


そして、気をとりなおして、


$ brew install nginx
==> Installing nginx dependency: pcre
==> Downloading ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.
######################################################################## 100.0%
######################################################################## 100.0%==> ./configure --prefix=/usr/local/Cellar/pcre/8.21 --enable-utf8 --enable-unic
==> make test
==> make install
/usr/local/Cellar/pcre/8.21: 126 files, 3.0M, built in 41 seconds
==> Installing nginx
==> Downloading http://nginx.org/download/nginx-1.0.11.tar.gz
######################################################################## 100.0%
==> Patching
patching file auto/lib/pcre/conf
patching file conf/nginx.conf
==> ./configure --prefix=/usr/local/Cellar/nginx/1.0.11 --with-http_ssl_module -
==> make
==> make install
==> Caveats
In the interest of allowing you to run `nginx` without `sudo`, the default
port is set to localhost:8080.

If you want to host pages on your local machine to the public, you should
change that to localhost:80, and run `sudo nginx`. You'll need to turn off
any other web servers running port 80, of course.

You can start nginx automatically on login running as your user with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/nginx/1.0.11/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist

Though note that if running as your user, the launch agent will fail if you
try to use a port below 1024 (such as http's default of 80.)
Warning: /usr/local/sbin is not in your PATH
You can amend this by altering your ~/.bashrc file
==> Summary
/usr/local/Cellar/nginx/1.0.11: 9 files, 824K, built in 22 seconds
$vi /usr/local/etc/nginx/nginx.conf


どっかのサイトを見て適当に設定します。


$/usr/local/sbin/nginx -t
$/usr/local/sbin/nginx


でとりあえず。
ブラウザでlocalhost:8080とかで確認します。
他などやりました。


$cp /usr/local/Cellar/nginx/1.0.11/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
$launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist


他、設定がまだわからないので、
どっかで調べたいです。


ハイパフォーマンスHTTPサーバ Nginx入門

ハイパフォーマンスHTTPサーバ Nginx入門