Apache HTTP Server: Difference between revisions
m →HTTP/2 Support: Changed year to decade |
m →HTTP/2 Support: Changed part stating prefork method is unavailable. |
||
| Line 40: | Line 40: | ||
Normal websites use HTTP 1.1 which was released in 1999, which is over 2 decades old now; the web has changed a lot since then. Based on Google's SPDY protocol, HTTP/2 allows, amongst other things, native compression, security, concurrent connections and prioritization. This makes the connection much more robust than before. | Normal websites use HTTP 1.1 which was released in 1999, which is over 2 decades old now; the web has changed a lot since then. Based on Google's SPDY protocol, HTTP/2 allows, amongst other things, native compression, security, concurrent connections and prioritization. This makes the connection much more robust than before. | ||
HTTP/2 is supported with Apache 2.4.12 with the addition of the mod_http2 module. It is natively supported with Apache >2.4.17 | HTTP/2 is supported with Apache 2.4.12 with the manual addition of the mod_http2 module. It is natively supported with Apache =>2.4.17 with the mod_http2 module available natively. In this article, we will focus on the latter. | ||
There are a few prerequisites that are required for HTTP/2 to work: | There are a few prerequisites that are required for HTTP/2 to work: | ||
* You must have a valid TLS certificate setup and working correctly. | * You must have a valid TLS certificate setup and working correctly. | ||
* | * You cannot use the prefork method of loading modules into Apache. Consider tabooing the <code>apache-prefork</code> package. The alternatives are worker and event. We are using event. Consequently: | ||
* You cannot use the <code>mod-php7</code> package to load PHP into Apache. PHP-FPM must be configured and used instead. Trying to use it will disable HTTP/2. | |||
To enable HTTP/2: | To enable HTTP/2: | ||