diff --git a/translated/tech/20181222 A Tale of HTTP-2.md b/published/20181222 A Tale of HTTP-2.md similarity index 77% rename from translated/tech/20181222 A Tale of HTTP-2.md rename to published/20181222 A Tale of HTTP-2.md index 9fcaddfad9..1374a98481 100644 --- a/translated/tech/20181222 A Tale of HTTP-2.md +++ b/published/20181222 A Tale of HTTP-2.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10404-1.html) [#]: subject: (A Tale of HTTP/2) [#]: via: (https://veronneau.org/a-tale-of-http2.html) [#]: author: (Louis-Philippe Véronneau https://veronneau.org/) @@ -14,7 +14,7 @@ 说实话,我刚刚重写了管理我们备份程序的 Puppet 代码,启用 HTTP/2 似乎是一种转向另一个大型项目之前有效的拖延方式。这有多难? -结果我花了大约 25 个小时来完成。坐下来穿上舒适的拖鞋,因为这是一个 HTTP/2 的故事! +结果我花了大约 25 个小时来完成。坐下来穿上舒适的拖鞋,听听这个 HTTP/2 的故事! [![The Yule Log][2]][3] @@ -25,15 +25,15 @@ ``` Protocols h2 h2c http/1.1 -H2Push on -H2PushPriority core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated after -H2PushPriority text/css before -H2PushPriority image/jpeg after 32 -H2PushPriority image/png after 32 -H2PushPriority application/javascript interleaved +H2Push on +H2PushPriority * after +H2PushPriority text/css before +H2PushPriority image/jpeg after 32 +H2PushPriority image/png after 32 +H2PushPriority application/javascript interleaved ``` -这当然很容易。即使 Apache 中的所有内容都已正确设置,网站仍然可以使用 HTTP/1.1。不过,显然我做得没错,因为我的网站现在发送了一个新的 HTTP 头:`Upgrade: h2, h2c`。 +这当然很容易。即使 Apache 中的所有内容都已正确设置,网站仍然使用的是 HTTP/1.1。不过,显然我做得没错,因为我的网站现在发送了一个新的 HTTP 头:`Upgrade: h2, h2c`。 在浪费了大量时间调试 TLS 密钥(HTTP/2 [与 TLS 1.1 不兼容][4])之后,我终于发现问题是没有使用正确的 Apache 多进程处理模块。 @@ -43,13 +43,13 @@ H2PushPriority application/javascript interleaved ![A clip from Alice in Wonderlands][5] -在很长一段时间里,一位好友一直试图让我相信 [PHP-FPM][6] 的优点。虽然纸上看起来很好, 但我从来没有真正试过。它看起来很复杂。常规的 `mod_php` 做得很好,还有其他事情需要我注意。 +在很长一段时间里,一位好友一直试图让我相信 [PHP-FPM][6] 的优点。虽然表面上看起来很好,但我从来没有真正试过。它看起来很复杂。常规的 `mod_php` 做得很好,还有其他事情需要我注意。 事实上,这次的 HTTP/2 事件是让我钻研它的一个契机。在我理解了 FPM 池的工作原理后,它实际上很容易设置。由于我不得不重写我们用于部署网站的 Puppet 配置文件,我也借此机会巩固了一堆东西。 PHP-FPM 允许你在不同的 Unix 用户下运行网站来增加隔离性。最重要的是,我决定是时候让我们服务器上的 PHP 代码以只读模式运行,并且不得不为我们的 Wordpress、Nextcloud、KanBoard 和 Drupal 实例调整一些东西来减少报错。 -过了很长时间通过 Puppet 的自动任务后,我终于能够在任何地方关闭 `mod_php` 和 `mpm_prefork` 并启用 `mpm_event` 和 `mod_http2`。PHP-FPM 和 HTTP/2 带来的速度提升不错,但更让我感到高兴的是这次磨练增强了我们的 Apache 处理 PHP 的能力。 +过了很长时间通过 Puppet 的自动任务后,我终于能够全部关闭 `mod_php` 和 `mpm_prefork` 并启用 `mpm_event` 和 `mod_http2`。PHP-FPM 和 HTTP/2 带来的速度提升不错,但更让我感到高兴的是这次磨练增强了我们的 Apache 处理 PHP 的能力。 ![Victory!][7] @@ -60,7 +60,7 @@ via: https://veronneau.org/a-tale-of-http2.html 作者:[Louis-Philippe Véronneau][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -72,4 +72,4 @@ via: https://veronneau.org/a-tale-of-http2.html [4]: https://http2.github.io/http2-spec/#TLSUsage [5]: https://veronneau.org/media/blog/2018-12-22/mod_php.gif (A clip from Alice in Wonderlands) [6]: https://wiki.apache.org/httpd/PHP-FPM -[7]: https://veronneau.org/media/blog/2018-12-22/victory.png (Victory!) \ No newline at end of file +[7]: https://veronneau.org/media/blog/2018-12-22/victory.png (Victory!)