私は多くのチュートリアルでApacheサーバー上でhttp2を有効にする方法を試しました。例えば Apache(Ubuntu 14.04)上のHTTP/2は機能しません
- http://pixelinc.co/ubuntu-14-04-3-apache-http-2-web-server-setup/
- https://www.gatherdigital.co.uk/community/post/how-to-setup-http-2-support/41
- https://icing.github.io/mod_h2/howto.html ...
しかし、成功せずに
は私の設定です:私は私のページをロードしようとしているときにここで
$ apache2 -v
Server version: Apache/2.4.23 (Ubuntu)
$ apachectl -M
Loaded Modules:
...
http2_module (shared)
...
ssl_module (shared)
...
は私の/etc/apache2/sites-available/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ServerName example.net
ServerAlias www.example.net
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1
Protocols h2 http/1.1
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
です(https://example.net )クロムには、私はこの応答ヘッダーを見ることができます:
HTTP/1.1 200 OK
Date: Tue, 09 Aug 2016 12:05:08 GMT
Server: Apache/2.4.23 (Ubuntu)
Upgrade: h2
Connection: Upgrade, Keep-Alive
Last-Modified: Thu, 30 Jun 2016 14:22:30 GMT
ETag: "b18-5367f99a49580-gzip"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 538
Keep-Alive: timeout=5, max=100
Content-Type: text/html
私は何かがありますか?あなたは私に何かヒントを教えてもらえますか?
本当に私の答えとしては機能しません:(私もondrej ppaを使用しています。 – Jeff