11. # vi ~/nginx/module3rd.cfg
3rd-party module
[headers-more-nginx-module]
form=git
url=https://github.com/openresty/headers-more-nginx-module.git
rev=v0.29
12. $ mkdir work
$ nginx-build -d work [-v 1.9.12]
-c nginx/configure -m nginx/module3rd.cfg
nginx-build: 0.7.1
Compiler: gc go1.6
2016/03/09 00:39:09 Download nginx-1.9.12.....
...
2016/03/09 00:39:29 Enter the following command for install
nginx.
$ cd work/nginx/1.9.12/nginx-1.9.12
$ sudo make install
build & make install
13. $ nginx -V
nginx version: nginx/1.9.12
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --sbin-path=/usr/sbin/nginx --conf-
path=/etc/nginx/nginx.conf --with-http_gzip_static_module --
with-http_ssl_module --with-http_v2_module --add-module=..
/headers-more-nginx-module
nginx の構成確認
17. 余談; SSL 証明書 ~Let's Encrypt!
● 使ってみた → 超簡単
$ git clone https://github.com/letsencrypt/letsencrypt
$ cd letsencrypt/
$ ./letsencrypt-auto --help
※ DNS 設定済み, nginx 停止中
$ ./letsencrypt-auto certonly -a standalone
-d example.com -d www.example.com
※ TUI が起動 → メアド入力&規約同意
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/example.com/fullchain.pem. Your cert will
expire on 2016-06-08. To obtain a new version of the certificate in
the future, simply run Let's Encrypt again.