我是服务器新手,我的网络服务器上运行着 2 个网站,它们是我的父亲。我目前正在尝试启用 http2 协议。
服务器操作系统:Ubuntu 16.04,使用 apache2
我在我的服务器上运行了以下命令:
a2enmod http2
a2enmod ssl
systemctl restart apache2
启用并重新启动模块后,我在端口 443 上添加了 SSL 虚拟主机:
Protocols h2 http/1.1
此后我跑了:
apt-get update
apt-get upgrade
然后再次重新启动,但没有任何变化。
所以所有的教程都展示了我已经完成的确切过程,但是我的网站只是决定保留 HTTP 1 协议。
我尝试过在谷歌上搜索,但由于我不是这方面的专家,我害怕会把事情搞砸。所以我很想听听你对我应该尝试的事情的建议。
我的 SSL 的虚拟主机。
<IfModule mod_ssl.c>
<VirtualHost *:443>
# 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
<Directory "/var/www/domain.nl/public_html">
AllowOverride All
Allow from All
</Directory>
# 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
</VirtualHost>
</IfModule>
我错过了什么?