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

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

问题描述

我想安装htt2_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 ,然后作为一种解决方法,我尝试使用此链接添加以下存储库

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),而Ubuntu 16.04或更高版本则使用默认apache. 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)[default = N]吗?

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

同时按两次Y,然后继续.

press Y both the times and proceed.

检查您的mods可用文件夹,您将看到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天全站免登陆