このブログは、旧・はてなダイアリー「檜山正幸のキマイラ飼育記 メモ編」(http://d.hatena.ne.jp/m-hiyama-memo/)のデータを移行・保存したものであり、今後(2019年1月以降)更新の予定はありません。

今後の更新は、新しいブログ http://m-hiyama-memo.hatenablog.com/ で行います。

nginx for Windows

http://www.nginx.org/en/download.html を見ると、最近のリリースにはWindows版も付いている。例えば、http://www.nginx.org/download/nginx-0.7.64.zip

zipを展開するだけで簡単。だが、いわゆるWindowsインストーラーにはなってないし、GUIも付いてない。この点で嫌われてしまうかもしれない。だけど、これは僕好みのUIだなー。起動終了は非常に簡単。

  • NGINX_HOME>start nginx
  • NGINX_HOME>nginx -s stop

nginx -h でヘルプが出る。


C:\Installed\nginx\nginx-0.7.64>nginx -h
nginx version: nginx/0.7.64
Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: NONE)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file


C:\Installed\nginx\nginx-0.7.64>

-c にいろいろ指定して実験すればいいわけだ。設定に関しては http://wiki.nginx.org/NginxConfiguration に記述がある。