LoginSignup
2
4

More than 5 years have passed since last update.

CentOS 7 ApacheのHTTP/2対応

Last updated at Posted at 2018-03-16

動作確認環境

事情によりバージョンをダウングレードしました。新しいバージョンでも動作するはずです。

  • 仮想環境 VMware Workstation Player 12.5.9
  • OS Windows 10 Pro 64bit

仮想環境

  • OS CentOS 7.4 (1708) minimalインストール
  • メモリ 2GB
  • HDD 250GB

前提条件

  • gcc 8.1.0
  • cmake 3.11.4
  • MySQL 5.7.22
  • OpenSSL 1.1.0.h
  • Apache 2.4.33

HTTP/2対応

共有ライブラリへパスを通す。

vi /etc/ld.so.conf
ld.so.conf
/usr/local/lib
/usr/local/ssl/lib

更新する。

ldconfig

HTTP2に対応させるため、Apacheのhttp.confmod_http2.soのコメント外す。

vi /usr/local/apache2/conf/httpd.conf
httpd.conf
LoadModule http2_module modules/mod_http2.so

LoadModuleの下に追記する。

httpd.conf
<IfModule http2_module>
    LogLevel http2:info
</IfModule>

Apacheを再起動し、何も表示がなければ起動が成功した。

systemctl restart httpd

参考

Setting up HTTP/2 on Apache to improve web performance | Tune The Web


目次

2
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
2
4