首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使HTTP2协议在服务器上工作

无法使HTTP2协议在服务器上工作
EN

Server Fault用户
提问于 2019-04-11 14:15:14
回答 1查看 165关注 0票数 0

我是一个服务器新手,我有两个网站运行在我的网络服务器,这是我的爸爸。我目前正在尝试启用http2协议。

服务器操作系统:Ubuntu16.04使用apache2

我在服务器上运行了以下命令:

代码语言:javascript
复制
a2enmod http2

a2enmod ssl

systemctl restart apache2

在启用和重新启动mods之后,我在端口443上添加了ssl虚拟主机:

代码语言:javascript
复制
Protocols h2 http/1.1 

在这之后我跑了:

代码语言:javascript
复制
apt-get update
apt-get upgrade

在那之后,又重新开始了一次,但没有改变。

因此,所有教程都显示了我已经完成的过程,但是<#>my网站只是决定停留在HTTP1协议中。

我已经尝试过搜索,但由于我不是专业人士,我是伤痕累累的病乱了一些严重的东西。所以我希望你能参与我应该尝试的事情。

我的SSL虚拟主机。

代码语言:javascript
复制
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.

        Protocols h2

        ServerName domain.nl
        ServerAlias www.domain.nl

        ServerAdmin email.com
        DocumentRoot /var/www/domain.nl/public_html

        
         AllowOverride All
         Allow from All
        

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/stinger_error.log
        CustomLog ${APACHE_LOG_DIR}/stinger_access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.nl/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.nl/privkey.pem

我错过了什么?

EN

回答 1

Server Fault用户

发布于 2019-04-22 23:16:31

原来是一个与HTTP2不兼容的预叉。

我使用了下面的指南来修复它。

https://techwombat.com/enable-http2-apache-ubuntu-16-04/

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/962617

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档