Im trying to enable http2 h2c in my website under ubuntu 18.04 and apache2, but it isnt working. heres what i have done
- use MPM-event instead of prefork
- Add protocols to 000-default.conf
<VirtualHost *:80>
ServerName 167.71.149.xxx
DocumentRoot /var/www/php56/folder1
Protocols h2c http/1.1
<Directory /var/www/php56/folder1>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
# Apache 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
- Restart apache
But im receiving the http/1.1 headers using chrome (up to date) and dont know what to check for
Just did
curl -I -k --http2 http://167.71.149.xxx/
HTTP/1.1 101 Switching Protocols Upgrade: h2c Connection: Upgrade
HTTP/2 200 date: Thu, 01 Jan 1970 00:00:00 GMT server: Apache/2.4.29 (Ubuntu) content-type: text/html; charset=UTF-8