I was looking into making my Apache 2.4.46 web server prefer HTTP2 but was unable to find any info on how to enable it with FreeBSD. At this point I'm curious if it's even possible at this time. Note: I am running HTTPS with lets encrypt certification
2 Answers
It's not possible, it's easy. Just edit /usr/local/etc/apache24/httpd.conf
and change the line
#LoadModule http2_module libexec/apache24/mod_http2.so
to
LoadModule http2_module libexec/apache24/mod_http2.so
Then enable http/2:
echo Protocols h2 h2c http/1.1 > /usr/local/etc/apache24/Includes/http2.conf
and restart apache:
/usr/local/etc/rc.d/apache24 restart
-
I followed your instructions and sadly nothing changed. I also added
Protocols h2 h2c http/1.1
to my virtualhost configuration file too... nothing– ari bMar 4, 2021 at 20:25 -
Please check if the statement
Include etc/apache24/Includes/*.conf
exists in/usr/local/etc/apache24/httpd.conf
. If not, you should put the lineProtocols h2 h2c http/1.1
inhttpd.conf
or add the aboveInclude...
statement.– gmelisMar 5, 2021 at 8:03
I cannot stress this enough! look at your Error logs! I found out that I was having the same issue as as The mpm module (prefork.c) is not supported by mod_http2 and that was my underlying problem