LoginSignup
5
4

More than 5 years have passed since last update.

homebrewでngx_small_lightがバンドルされたnginxをインストール

Last updated at Posted at 2015-03-27

homebrew/nginxをtapするとngx_small_lightがインストールできるようになったらしいので試してみました。

$ brew tap homebrew/nginx
$brew info nginx-full | grep small-light
--with-small-light-module
$

nginx-fullの方に--with-small-light-moduleオプションが追加されているので、これを利用すればよさそうです。

$ brew install nginx-full --with-small-light-module
==> Installing nginx-full from homebrew/homebrew-nginx
==> Installing nginx-full dependency: small-light-nginx-module
==> Downloading https://github.com/cubicdaiya/ngx_small_light/archive/v0.6.6.tar.gz
Already downloaded: /Library/Caches/Homebrew/small-light-nginx-module-0.6.6.tar.gz
�  /usr/local/Cellar/small-light-nginx-module/0.6.6: 33 files, 232K, built in 2 seconds
==> Installing nginx-full
==> Downloading http://nginx.org/download/nginx-1.6.2.tar.gz
######################################################################## 100.0%
==> ./setup
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.6.2 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/usr/local/Cellar/nginx-full/1.6.2/bi
==> make
==> make install
==> Caveats
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

- Tips -
Run port 80:
 $ sudo chown root:wheel /usr/local/Cellar/nginx-full/1.6.2/sbin/nginx
 $ sudo chmod u+s /usr/local/Cellar/nginx-full/1.6.2/sbin/nginx
Reload config:
 $ nginx -s reload
Reopen Logfile:
 $ nginx -s reopen
Stop process:
 $ nginx -s stop
Waiting on exit process
 $ nginx -s quit

To have launchd start nginx-full at login:
    ln -sfv /usr/local/opt/nginx-full/*.plist ~/Library/LaunchAgents
Then to load nginx-full now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx-full.plist
==> Summary
�  /usr/local/Cellar/nginx-full/1.6.2: 7 files, 940K, built in 20 seconds
$ /usr/local/bin/nginx -V
nginx version: nginx/1.6.2
built by clang 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/Cellar/nginx-full/1.6.2 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/usr/local/Cellar/nginx-full/1.6.2/bin/nginx --with-cc-opt='-I/usr/local/include -I/usr/local/opt/pcre/include -I/usr/local/opt/openssl/include' --with-ld-opt='-L/usr/local/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/openssl/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/run/nginx.lock --http-client-body-temp-path=/usr/local/var/run/nginx/client_body_temp --http-proxy-temp-path=/usr/local/var/run/nginx/proxy_temp --http-fastcgi-temp-path=/usr/local/var/run/nginx/fastcgi_temp --http-uwsgi-temp-path=/usr/local/var/run/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/var/run/nginx/scgi_temp --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --add-module=/usr/local/share/small-light-nginx-module

ちゃんとngx_small_lightが--add-moduleされています。追加するPRを投げてくれた@Tei1988 さん、ありがとうございます。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4