为什么Ubuntu 16.04上不存在apache2模块http2?

编程入门 行业动态 更新时间:2024-10-23 11:19:13
本文介绍了为什么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?

本文发布于:2023-11-01 20:07:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550283.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上不   模块   Ubuntu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!