
今日はDebian Webサーバーを毎週アップグレードします。
次のメッセージを受け取りました。
apache2 (2.4.25-3+deb9u5) stretch; urgency=medium * This package upgrades mod_http2 to the version from apache2 2.4.33. This fixes a lot of bugs and some security issues, but it also removes the support for using HTTP/2 when running with mpm_prefork. HTTP/2 support is only provided when running with mpm_event or mpm_worker. -- Stefan Fritsch <[email protected]> Sat, 02 Jun 2018 09:51:46 +0200
私のサーバーでHTTP / 2を使用しているので、これは私を驚かせます。私のサーバーをテストしました。SSL研究所、HTTP/2は実際に消えました。
公式のApacheとPHP 7.0パッケージを使用すると仮定すると、この問題をどのように解決できますか?
答え1
私の場合は、次のコマンドを適用して再びroot
機能させました。
# enable these mods
a2enmod proxy_fcgi setenvif
# disable standard PHP module
a2dismod php7.3
# if you don't have FPM already installed
apt-get install php7.3-fpm
# query the MPM
a2query -M
prefork
またはが表示されたら、次のworker
手順に進む必要があります。が表示されたら、event
次のステップ2をスキップできます。
# disable the prefork / worker MPM (only one MPM can run at a time)
a2dismod mpm_prefork mpm_worker
# enable event MPM
a2enmod mpm_event
# start and enable the FastCGI Process Manager
systemctl start php7.3-fpm && systemctl enable php7.3-fpm
# enable the FastCGI Process Manager configuration
a2enconf php7.3-fpm
# start Apache2 web server
systemctl restart apache2
GNU/Linux Debian 10 Buster で実行するようにテストされました。2019年4月11日。
最後に、ALPNを介してHTTP / 2を有効にできるようになりました。
このファイル内のすべてのサイトに対してグローバルにこれを行うことができます。
/etc/apache2/apache2.conf
次のコマンドを使用します。
Protocols h2 http/1.1