我试图在我的网站上启用http2 h2c,在ubuntu18.04和apache2下,但是它不起作用。这是我所做的
ServerName 167.71.149.xxx
DocumentRoot /var/www/php56/folder1
Protocols h2c http/1.1
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
# Apache 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm但是im使用chrome (最新的)接收http/1.1报头,并且不知道要检查什么
刚做了
curl -I -k --http2 http://167.71.149.xxx/HTTP/1.1 101交换协议升级: h2c连接:升级
HTTP/2 200日期:清华,1970年1月1日00:00格林尼治时间服务器: Apache/2.4.29 (Ubuntu)内容类型: text/html;charset=UTF-8
发布于 2020-04-14 00:57:33
验证您是否启用了HTTP/2模块
$ a2enmod http2
$ apache2ctl -M | grep http2
http2_module (shared)议定书一行应改为:
Protocols h2 h2c http/1.1发布于 2020-05-09 13:10:08
但是im使用chrome (最新的)接收http/1.1报头,并且不知道要检查什么
浏览器仅支持HTTPS:https://stackoverflow.com/questions/34076231/why-do-browser-implementations-of-http-2-require-tls上的HTTP/2
https://serverfault.com/questions/1012178
复制相似问题