为什么 Ubuntu 16.04 上不存在 apache2 模块 http2? [英] Why does apache2 module http2 not exist on Ubuntu 16.04?

查看:19
本文介绍了为什么 Ubuntu 16.04 上不存在 apache2 模块 http2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装 htt2_module.按照此 link,我试图启用刚刚运行的 http2_module

I'd like to install htt2_module. After a fresh installation of Ubuntu 14.04 following the steps listed in this link, I have tried to enable the http2_module just running

sudo a2enmod http2

但我得到:模块 http2 不存在!

but I get: Module http2 does not exist!

安装的apache版本为:Apache/2.4.7,然后作为一种解决方法,我尝试使用此 link 添加以下存储库

the apache version installed is:Apache/2.4.7 ,then as a workaround I tried with this link adding the following repository

sudo add-apt-repository ppa:ondrej/apache2

在使用 sudo apt-get update 刷新并再次运行安装/启用 http2 的命令后,我得到了同样的错误.模块 http2 不存在.

after refreshing with sudo apt-get update, and running again the command to install/enable the http2 I get the same error. Module http2 does not exist.

推荐答案

实际上,apache 2.4.17 或更高版本支持 http2 模块(为了更好的稳定性,您应该至少使用 2.4.23)但默认 apache 用于 Ubuntu 16.04 或14.04 低于最低要求,以便升级您的 apache请按照以下步骤操作:

Actually, http2 module is supported on apache 2.4.17 or higher (for better stability you should use at least 2.4.23) but default apache for Ubuntu 16.04 or 14.04 is lower than minimum required so in order to upgrade your apache follow below steps:

$ sudo add-apt-repository -y ppa:ondrej/apache2

$ sudo apt-key update

$ sudo apt-get update

然后运行

$ sudo apt-get --only-upgrade install apache2 -y

在这里你会被提示两次:

here you will be promted two times like :

*** apache2.conf (Y/I/N/O/D/Z) [默认=N] ?

*** apache2.conf (Y/I/N/O/D/Z) [default=N] ?

两次按 Y 并继续.

检查您的 mods-available 文件夹,您将看到 http2.load 文件

Check your mods-available folder you will see http2.load file

$ sudo a2enmod http2

你会得到以下输出

启用模块 http2.要激活新配置,您需要运行:service apache2 restart

Enabling module http2. To activate the new configuration, you need to run: service apache2 restart

这篇关于为什么 Ubuntu 16.04 上不存在 apache2 模块 http2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆