nginxで使用しているモジュール一覧を綺麗に表示
apache の httpd -lの使用モジュール一覧みたいにnginxでモジュール一覧を取得するにはnginx -Vでconfigureを見ればいいが、非常にみずらい。
せめて スペースで改行しようと思ったがうまく動かない。
nginx -V | tr ’’ '\n'
nginx -Vの出力って標準エラー出力で吐いているのね。
2>&1 nginx -V | tr -- - '\n' | grep _module
http_ssl_module http_stub_status_module http_realip_module http_addition_module http_dav_module http_geoip_module http_gzip_static_module http_image_filter_module http_spdy_module http_sub_module http_xslt_module mail_ssl_module
ubuntuデフォルトのnginxのconfig
configure --with-cc-opt='-g-O2-fstack-protector--param=ssp-buffer-size=4-Wformat-Werror=format-security-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions-Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module