Answer the question
In order to leave comments, you need to log in
Trying to migrate to HTTP/2. What's my mistake?
Hello. There is a resource on vps:
a2enmod http2
apachectl -t && systemctl restart apache2
bash -c 'cat >/etc/apache2/conf-available/http2.conf' <<EOF
Protocols h2 h2c http/1.1
H2Push on
H2PushPriority * after
H2PushPriority text/css before
H2PushPriority image/jpeg after 32
H2PushPriority image/png after 32
H2PushPriority application/javascript interleaved
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite 'EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS'
EOF
Protocols h2 h2c http/1.1
Answer the question
In order to leave comments, you need to log in
1. What version of Apache do you have? 2.4.24 or older?
2. http2 is simply enabled by adding the line Protocols h2 h2c http/1.1 to Apache's head config.
3. A banal question after editing the Apache config rebooted Apache? ssl certificates are cut right?
4. And finally, a banal question after editing the Apache config did you rebuild Apache?
5. If points 1-4 are OK, then you have mpm_prefork which is not compatible with http2, go to event . But you have to rebuild php / switch to php-fpm. (Well, of course Apache becomes essentially unnecessary)
6. You can check http2 Here
There can
be no other options Most likely the problem is in the 5th paragraph described by me .
Solved a problem. If anyone is looking, here is the solution:
the "standard" Apache "prefork" module is not very compatible with HTTP/2, so you need to use a more suitable one. Turn off one, turn on the other, restart Apache.
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
service apache2 restart
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question