###前提・実現したいこと
Passenger + nginxでRails環境を構築していたのですが、Passenger経由でセットされるnginx.conf
を書き換えてHTTP/2を入れようとしたところ、以下のようにHTTP/2のディレクティブを認識しない事態となってしまいました。HTTP/2を有効にするには、listen
のhttp2
以外に何か設定が必要なのでしょうか。
なお、SSL+HTTP/1.1は問題なく設定できています。そこにhttp2;
を書き足してのエラーです。
###発生している問題・エラーメッセージ
*** ERROR *** Could not start Passenger Nginx core: nginx: [warn] duplicate MIME type "\ " in /tmp/passenger-standalone.jjv0ai/config:82 nginx: [warn] duplicate MIME type "\ " in /tmp/passenger-standalone.jjv0ai/config:82 nginx: [emerg] the "http2" parameter requires ngx_http_v2_module in /tmp/passenger-standalone.jjv0ai/config:93 Stopping web server... done
###試したこと
以下のように、nginx -V
を見る限り--with-http_v2_module
も入っているので、「requires ngx_http_v2_module
」の意味がわからない状態です。そして、openssl version
も、OpenSSL 1.0.2k-fips 26 Jan 2017
と、ALPNに必要な1.0.2を満たしています。
nginx version: nginx/1.12.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=' -Wl,-E'
###補足情報(言語/FW/ツール等のバージョンなど)
- Linux ip---- 4.9.51-10.52.amzn1.x86_64 #1 SMP Fri Sep 29 01:16:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- Phusion Passenger 4.0.60
なお、Elastic Beanstalk環境なので、Passengerやnginxなどののアップデートは難しいです(シングルインスタンスなので、インスタンス内でHTTPSを処理しています)。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/26 05:39
2018/01/26 05:48 編集