{"id":485769,"date":"2026-07-01T08:30:42","date_gmt":"2026-07-01T08:30:42","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=485769"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=485769","title":{"rendered":"\u0421\u0442\u0440\u0438\u043c\u0438\u043d\u0433 ZIP\u2011\u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430\u00a0\u043b\u0435\u0442\u0443 \u0441\u00a0nginx + mod_zip\u00a0\u2014 \u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u0430\u043a 2\u00a0\u0431\u0430\u0439\u0442\u0430 \u043f\u0435\u0440\u0435\u0441\u043b\u0430\u0442\u044c"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432\u00a0\u0420\u043e\u0441\u044d\u043b\u0442\u043e\u0440\u0433, \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0442\u043e\u0440\u0433\u043e\u0432: \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u0439, \u0431\u043e\u043b\u0435\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430\u00a0\u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0451\u043c \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0442\u043e\u0440\u0433\u043e\u0432 \u043f\u0435\u0440\u0435\u0432\u0430\u043b\u0438\u043b \u0437\u0430 52\u00a0\u0442\u0440\u043b\u043d \u0440\u0443\u0431\u043b\u0435\u0439. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u00a0\u0437\u0430\u043a\u0443\u043f\u043a\u0430\u043c, \u0437\u0430\u044f\u0432\u043a\u0430\u043c, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c, \u0430\u043a\u043a\u0440\u0435\u0434\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u044b\u00a0\u2014 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a\u00a0\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0440\u043e\u043b\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u043a\u0443\u043f\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b.<\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0430\u0440\u0445\u0438\u0432\u043e\u043c. \u0414\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0443\u00a0\u043d\u0430\u0441 \u0434\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0438\u0437\u00a0\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u0430\u043c\u0438\u00a0\u0436\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438,\u00a0\u043b\u0438\u0431\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u00a0\u043d\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438. \u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0443\u00a0\u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<a href=\"https:\/\/github.com\/evanmiller\/mod_zip\" rel=\"noopener noreferrer nofollow\"> mod_zip<\/a>, \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f\u00a0nginx. \u041a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0436\u0435. \u041d\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u00a0\u0443\u00a0\u043d\u0430\u0441, \u0430\u00a0\u0432\u00a0\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445. \u0423\u00a0\u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0436\u0435\u00a0\u0431\u044b\u043b \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u00a0\u0441\u0435\u0440\u0432\u0435\u0440, \u0440\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u0443\u043c\u043c, \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 ZIP \u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e\u00a0\u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0\u043b\u0438\u0448\u043d\u044f\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a \u0438 \u0441\u0435\u0442\u044c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0434\u043e\u043b\u044c\u0448\u0435 \u0436\u0434\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u044d\u0442\u043e \u0438\u043d\u0430\u0447\u0435\u00a0\u2014 \u0447\u0435\u0440\u0435\u0437 mod_zip \u0441\u00a0proxy_pass \u0434\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0412\u00a0\u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u0434\u0435\u043c\u043e, \u0433\u0434\u0435 \u0432\u0441\u0451 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0440\u043e\u0433\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0412\u00a0\u0434\u0435\u043c\u043e\u2011\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u00a0\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430\u0445 \u043a\u043e\u0434\u0430 \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0431\u0435\u0437\u00a0\u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 <\/p>\n<h3>\u041a\u0430\u043a\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 mod_zip<\/h3>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 HTTP\u2011\u043e\u0442\u0432\u0435\u0442\u044b \u0441\u00a0\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>X-Archive-Files: zip<\/code>, \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u0435\u043b\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u0430\u043a\u00a0\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 nginx \u0438 \u0441\u0442\u0440\u0438\u043c\u0438\u0442 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 ZIP\u2011\u0430\u0440\u0445\u0438\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043d\u0430\u00a0\u0434\u0438\u0441\u043a.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430: \u043f\u043e\u00a0\u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043d\u0430\u00a0\u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code class=\"nginx\">&lt;crc32&gt; &lt;\u0440\u0430\u0437\u043c\u0435\u0440_\u0432_\u0431\u0430\u0439\u0442\u0430\u0445&gt; &lt;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url&gt; &lt;\u0438\u043c\u044f_\u0432_\u0430\u0440\u0445\u0438\u0432\u0435&gt; &lt;crc32&gt; &lt;\u0440\u0430\u0437\u043c\u0435\u0440_\u0432_\u0431\u0430\u0439\u0442\u0430\u0445&gt; &lt;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url&gt; &lt;\u0438\u043c\u044f_\u0432_\u0430\u0440\u0445\u0438\u0432\u0435&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"nginx\">037b3c3a  664   \/local-files\/lorem.txt              lorem.txtb91a4c12  8832  \/local-files\/data.csv               data.csv-         1478  \/proxy-remote\/evanmiller\/mod_zip\/master\/LICENSE  remote\/LICENSE<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043b\u0435 <code>\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 location \u0432 <code>nginx.conf<\/code>. \u041d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 <code>alias<\/code> \u0434\u043b\u044f\u00a0\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 <code>proxy_pass<\/code> \u0434\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445. \u041a\u043b\u0438\u0435\u043d\u0442 \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u0432\u0438\u0434\u0438\u0442.<\/p>\n<p>\u041f\u043e\u043b\u0435 CRC32\u00a0\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e: \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>-<\/code> \u0438 mod_zip \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430\u00a0\u043b\u0435\u0442\u0443. \u041c\u0438\u043d\u0443\u0441: \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 <code>Range<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u00a0\u0431\u0443\u0434\u0443\u0442. \u0422\u0430\u043a \u043a\u0430\u043a\u00a0\u0443\u00a0\u043d\u0430\u0441 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430\u00a0\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043f\u043e\u00a0\u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435, \u0442\u043e \u0434\u043b\u044f\u00a0\u043d\u0430\u0441 \u044d\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e. \u041f\u043e\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u043c\u044f \u0432\u00a0\u0430\u0440\u0445\u0438\u0432\u0435\u00a0\u2014 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b<strong>.<\/strong> \u0411\u0435\u0437\u00a0\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0430\u0439\u043b\u0430 \u0430\u0440\u0445\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0431\u0438\u0442\u044b\u043c. \u041e\u0431\u00a0\u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435. <\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041f\u043e\u0442\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u00a0\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u0430:<\/p>\n<pre><code class=\"nginx\">\u041a\u043b\u0438\u0435\u043d\u0442 \u2514\u2500\u25ba nginx (mod_zip)      \u251c\u2500 \/api\/download\/*  \u2500\u2500\u25ba PHP-FPM (FastCGI)      \u2502                           \u2514\u2500 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 X-Archive-Files      \u2502      \u251c\u2500 [internal] \/local-files\/    \u2500\u2500\u25ba alias \/var\/www\/files\/      \u2514\u2500 [internal] \/proxy-remote\/   \u2500\u2500\u25ba proxy_pass upstream_service<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u043e\u043b\u044c \u0431\u044d\u043a\u0430 (\u0443 \u043d\u0430\u0441 PHP, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c PHP) \u0437\u0434\u0435\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430: \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0441\u00a0\u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438. PHP \u043d\u0435\u00a0\u0432\u0438\u0434\u0438\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435. nginx \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u0438\u0448\u0435\u0442 \u0435\u0433\u043e \u0432\u00a0ZIP\u2011\u043f\u043e\u0442\u043e\u043a.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433 nginx:<\/p>\n<pre><code class=\"nginx\"># PHP API \u2014 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439location \/api\/ {    fastcgi_pass php:9000;    fastcgi_param SCRIPT_FILENAME \/var\/www\/html\/public\/index.php;    include fastcgi_params;}# \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b: internal - \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 nginxlocation \/local-files\/ {    internal;    alias \/var\/www\/files\/;}# \u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b: \u0442\u0430\u043a\u0436\u0435 internal, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441location \/proxy-remote\/ {    internal;    proxy_pass https:\/\/your-external-service.com\/;    rewrite ^\/proxy-remote\/(.*) \/$1 break;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"php\">public function download(Response $res, array $files): Response{    $lines = [];    foreach ($files as $entry) {        $lines[] = sprintf(            '%s %d %s %s',            $entry['crc32'] ?? '-',            $entry['size'],            $entry['internal_url'],            $entry['filename']        );    }    $manifest = implode(\"\\n\", $lines) . \"\\n\";    return $res        -&gt;withHeader('X-Archive-Files', 'zip')        -&gt;withHeader('Content-Disposition', 'attachment; filename=\"documents.zip\"')        -&gt;withStatus(200)        -&gt;withBody($this-&gt;toStream($manifest));}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430, ZIP\u2011\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d<\/h3>\n<p>ZIP\u2011\u0430\u0440\u0445\u0438\u0432 \u044d\u0442\u043e \u043d\u0435\u00a0\u043e\u0434\u0438\u043d \u0441\u0436\u0430\u0442\u044b\u0439 \u0431\u043b\u043e\u0431, \u0430\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u00a0local file header, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u00a0\u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u0436\u0430\u0442\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u00a0\u043a\u043e\u043d\u0446\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 central directory, \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430\u00a0\u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0424\u043e\u0440\u043c\u0430\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438: \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0441\u0442\u0440\u0438\u043c\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u041f\u0440\u0438\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 ZIP \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u00a0HTTP\u2011\u043e\u0442\u0432\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0430\u0434 \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u00a0\u2014 \u0431\u0430\u0439\u0442\u044b \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e\u00a0\u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412\u00a0\u0441\u0430\u043c\u043e\u043c ZIP\u2011\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c Data Descriptor (generalPurposeBitFlag=0\u00d70008), \u043a\u043e\u0433\u0434\u0430 \u0432\u00a0local file header \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0443\u043b\u0438 \u0438\u043b\u0438\u00a0\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438 CRC, \u0430\u00a0\u043f\u043e\u0441\u043b\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u043e\u00a0mod_zip \u043f\u0438\u0448\u0435\u0442 local file header \u0434\u043e\u00a0\u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u00a0\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430. \u041a\u00a0\u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d. \u041b\u044e\u0431\u043e\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0441\u0442 \u0431\u0438\u0442\u044b\u0439 \u0430\u0440\u0445\u0438\u0432. \u0414\u043b\u044f\u00a0\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: <code>filesize()<\/code> \u0432\u00a0PHP. \u0421\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u0440\u0438\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Content-Length<\/code>. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435: \u0431\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0443\u00a0\u0432\u0430\u0441 \u043d\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f\u00a0\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"php\">private function getRemoteFileSize(string $url): int{    $ctx = stream_context_create(['http' =&gt; [        'method'          =&gt; 'HEAD',        'timeout'         =&gt; 5,        'follow_location' =&gt; 1,        'ignore_errors'   =&gt; true,        'header'          =&gt; \"User-Agent: your-app\/1.0\\r\\n\",    ]]);    $headers = @get_headers($url, true, $ctx);    if ($headers === false) {        return 0;    }    $cl = $headers['Content-Length'] ?? $headers['content-length'] ?? 0;    if (is_array($cl)) {        $cl = end($cl); \/\/ \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0432    }    return (int) $cl;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: PHP \u043d\u0435\u00a0\u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0internal location \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e\u00a0\u2014 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 nginx subrequest, \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 mod_zip. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>internal<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0location \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0433\u043e nginx. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f\u00a0HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u0430 PHP \u0438\u0434\u0451\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a\u00a0\u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u0442\u0430\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u043e\u0434\u0435, \u043d\u043e\u00a0\u0434\u043b\u044f\u00a0\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044f \u0437\u0430\u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u044d\u0442\u043e\u0442 location). \u0421\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 nginx <code>proxy_pass,<\/code> \u043a\u043e\u0433\u0434\u0430 mod_zip \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 nginx\u2011\u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>\u041d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u00a0\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d nginx location\u2011\u043f\u0440\u0435\u0444\u0438\u043a\u0441 (internal, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 API, \u0438\u043b\u0438\u00a0\u0431\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u043e\u043f\u0446\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b). \u0412\u00a0\u0434\u0435\u043c\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u0434\u0438\u043d <code>internal<\/code> \u0434\u043b\u044f\u00a0GET\u2011\u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 mod_zip, \u043e\u0434\u0438\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437\u00a0PHP. \u0412\u00a0\u0434\u0435\u043c\u043e \u044f \u043d\u0430\u0437\u0432\u0430\u043b \u0438\u0445 <code>\/proxy-remote\/<\/code> \u0438 <code>\/proxy-head\/<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c internal location \u043d\u0430\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u00a0\u0441\u0432\u043e\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u00a0\u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e auth middleware, \u0442\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043e\u0442\u00a0\u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437\u0432\u043d\u0435, \u043d\u0435\u00a0\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0435 \u043f\u043b\u044e\u0441\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u00a0env, \u0411\u0414 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0432\u00a0\u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0412\u00a0\u044d\u0442\u043e\u043c\u00a0\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u043f\u0440\u0438\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 nginx \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u00a0\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0430\u00a0\u0443\u0436\u0435 \u0438\u0437\u00a0\u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043d\u0430\u00a0\u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0414\u043e\u00a0\u0438 \u043f\u043e\u0441\u043b\u0435<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\n<\/th>\n<th data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">mod_zip + \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/th>\n<th>\n<p align=\"left\">mod_zip + proxy_pass<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0434\u043e\u00a0\u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430<\/p>\n<\/td>\n<td data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0440\u0430\u0437\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\u041f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/p>\n<\/td>\n<td data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">\u041f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0430\u0440\u0445\u0438\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u041a\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\u0421\u0435\u0442\u044c \u043d\u0430\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/p>\n<\/td>\n<td data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">\u0414\u0432\u0430\u0436\u0434\u044b: upstream \u2192 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u2192 \u043a\u043b\u0438\u0435\u043d\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0434\u0438\u043d \u0440\u0430\u0437: upstream \u2192 nginx \u2192 \u043a\u043b\u0438\u0435\u043d\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/p>\n<\/td>\n<td data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0434\u0438\u0441\u043a\u043e\u043c \u0438 CPU<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0441\u0435\u0442\u044c\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"214\" width=\"214\">\n<p align=\"left\">\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, Disk I\/O<\/p>\n<\/td>\n<td data-colwidth=\"272\" width=\"272\">\n<p align=\"left\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0432\u00a0\u0430\u0440\u0445\u0438\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u0440\u0438\u043c\u044f\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 nginx<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u043a\u00a0\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0449\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a, \u0438 \u043d\u0430\u00a0\u0441\u0435\u0442\u044c \u0432\u0434\u0432\u043e\u0435. \u041c\u0438\u043d\u0443\u0441\u00a0\u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0434\u043b\u044f\u00a0\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c nginx.<\/p>\n<h3>\u0414\u0435\u0431\u0430\u0433\u0433\u0438\u043d\u0433 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>\u041f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b mod_zip \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0nginx \u0438 \u043d\u0435\u00a0\u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u00a0\u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u00a0\u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u00a0\u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0431\u043e\u0440\u0430 \u043b\u043e\u0433\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u0438\u0434\u0443\u0442 \u043c\u0438\u043c\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041b\u043e\u0433\u043e\u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0435\u00a0\u0431\u0443\u0434\u0435\u0442 \u0432\u00a0Kibana \u0438\u043b\u0438\u00a0\u0438\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435\u00a0\u0442\u0430\u043a, \u0430\u0440\u0445\u0438\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 \u0438 \u0434\u043e\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f nginx.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <code>proxy_pass<\/code>. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 FastCGI\u2011\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430\u00a0\u0442\u043e\u043c, \u043a\u0430\u043a\u00a0nginx \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438. <code>proxy_pass<\/code> \u0441 <code>internal<\/code>\u00a0\u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u0442\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432\u00a0\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445).<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e\u00a0\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 debug\u2011\u043b\u043e\u0433 nginx (\u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0432\u00a0\u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0436\u0435 \u043d\u0435\u0442):<\/p>\n<pre><code class=\"nginx\">error_log \/var\/log\/nginx\/error.log debug;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418\u0449\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"nginx\">mod_zip: subrequest for \"\/proxy-remote\/some\/file.pdf\" initiated, result 0mod_zip: subrequest for \"\/proxy-remote\/some\/file.pdf\" finalized, status 200<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u00abfinalized\u00bb \u0438\u043b\u0438\u00a0\u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0435 200\u00a0\u2014 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u00a0\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<h3>\u0427\u0442\u043e\u00a0\u043f\u043e\u0448\u043b\u043e \u043d\u0435\u00a0\u0442\u0430\u043a<\/h3>\n<p>\u0412\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u00a0\u0434\u0435\u043c\u043e: \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441\u00a0\u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0440\u043e\u043b\u044f\u043c\u0438 \u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438. \u041b\u043e\u0433\u0438\u043a\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430, \u0435\u0441\u0442\u044c retry\u2011\u043b\u043e\u0433\u0438\u043a\u0430 \u0438 fallback, \u043a\u043e\u0433\u0434\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<p>\u0414\u0432\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b HEAD \u0438 \u0441\u00a0\u043d\u0438\u043c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u00a0\u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b HEAD, \u043d\u043e\u00a0\u0443\u00a0\u043d\u0430\u0441 \u0432\u00a0\u0431\u0430\u0437\u0435\u00a0\u0431\u044b\u043b\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432\u00a0\u0411\u0414\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0445.<\/p>\n<p>\u0422\u0435\u0441\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u0438 \u043d\u0430\u00a0\u0432\u0441\u0435\u0445 \u0441\u0442\u0435\u043d\u0434\u0430\u0445. \u0417\u0430\u0440\u0435\u043b\u0438\u0437\u0438\u043b\u0438\u0441\u044c, \u043d\u043e\u00a0\u0430\u0440\u0445\u0438\u0432\u044b \u043f\u043e\u00a0\u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443 \u043d\u0435\u00a0\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435\u00a0\u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u043b\u043e\u0433 nginx. \u0412\u0435\u0440\u043d\u0443\u0432\u0448\u0438\u0441\u044c \u043a\u00a0\u043a\u043e\u0434\u0443, \u043d\u0430\u0448\u0451\u043b \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0433\u0434\u0435 \u043c\u043e\u0433\u043b\u0430\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438\u0437\u00a0\u0431\u0430\u0437\u044b. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u00a0\u043f\u0440\u043e\u0434 \u043f\u043e\u00a0\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c JSONB\u2011\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u00a0\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u00a0\u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\u00a0\u0431\u044b\u043b\u0438 \u0447\u0438\u0441\u0442\u044b\u043c\u0438 (\u0434\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u043e\u00a0\u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u00a0\u043f\u043e\u0439\u043c\u0430\u043b\u0438. \u0414\u043b\u044f\u00a0\u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438\u0441\u044c: \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f\u00a0\u043d\u043e\u0432\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u00a0\u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f\u00a0\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u00a0\u043d\u0430\u043c. \u0414\u043b\u044f\u00a0\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u00a0\u044d\u0442\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b JSONB\u2011\u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432\u00a0\u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043c\u0430\u0441\u0441\u043e\u0432\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u00a0\u0438\u043c\u0435\u043b\u0430 \u0441\u043c\u044b\u0441\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a\u00a0\u043d\u043e\u0432\u043e\u043c\u0443 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 \u043b\u0435\u043d\u0438\u0432\u043e, \u0432\u00a0\u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u00a0\u0431\u0430\u0437\u0435.<\/p>\n<p>0\u00a0\u044d\u0442\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u2011\u0437\u0430 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u00a0\u0431\u0443\u0434\u0435\u0442. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0431\u0438\u0442\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0438\u043b\u0438\u00a0\u0437\u0430\u0432\u0438\u0441\u0448\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0443. \u0421\u0442\u043e\u0438\u0442 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0451 (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439, \u0445\u044d\u0448\u0441\u0443\u043c\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435) \u0434\u043e\u00a0\u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430.<\/p>\n<h3>\u0414\u0435\u043c\u043e<\/h3>\n<p>\u0421\u043e\u0431\u0440\u0430\u043b Docker\u2011\u0434\u0435\u043c\u043e \u0441\u00a0\u0442\u0440\u0435\u043c\u044f \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430: \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0447\u0435\u0440\u0435\u0437 nginx proxy_pass \u0438 \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0441\u00a0\u043e\u0431\u043e\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438. Docker \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430: <a href=\"https:\/\/github.com\/dmitrii-starikov\/on-the-fly-archive-demo\" rel=\"noopener noreferrer nofollow\">github.com\/dmitrii\u2011starikov\/on\u2011the\u2011fly\u2011archive\u2011demo<\/a><\/p>\n<pre><code class=\"bash\">make start # \u0417\u0430\u0439\u0442\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 http:\/\/localhost:8099<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1054302\/\">https:\/\/habr.com\/ru\/articles\/1054302\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432\u00a0\u0420\u043e\u0441\u044d\u043b\u0442\u043e\u0440\u0433, \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0442\u043e\u0440\u0433\u043e\u0432: \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u0439, \u0431\u043e\u043b\u0435\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430\u00a0\u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0451\u043c \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0442\u043e\u0440\u0433\u043e\u0432 \u043f\u0435\u0440\u0435\u0432\u0430\u043b\u0438\u043b \u0437\u0430 52\u00a0\u0442\u0440\u043b\u043d \u0440\u0443\u0431\u043b\u0435\u0439. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u00a0\u0437\u0430\u043a\u0443\u043f\u043a\u0430\u043c, \u0437\u0430\u044f\u0432\u043a\u0430\u043c, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c, \u0430\u043a\u043a\u0440\u0435\u0434\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u044b\u00a0\u2014 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a\u00a0\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0440\u043e\u043b\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u043a\u0443\u043f\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b.\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0430\u0440\u0445\u0438\u0432\u043e\u043c. \u0414\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0443\u00a0\u043d\u0430\u0441 \u0434\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0438\u0437\u00a0\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u0430\u043c\u0438\u00a0\u0436\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438,\u00a0\u043b\u0438\u0431\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u00a0\u043d\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438. \u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0443\u00a0\u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f mod_zip, \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f\u00a0nginx. \u041a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0438\u0436\u0435. \u041d\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u00a0\u0443\u00a0\u043d\u0430\u0441, \u0430\u00a0\u0432\u00a0\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445. \u0423\u00a0\u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0436\u0435\u00a0\u0431\u044b\u043b \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u00a0\u0441\u0435\u0440\u0432\u0435\u0440, \u0440\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u0443\u043c\u043c, \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 ZIP \u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e\u00a0\u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0\u043b\u0438\u0448\u043d\u044f\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a \u0438 \u0441\u0435\u0442\u044c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0434\u043e\u043b\u044c\u0448\u0435 \u0436\u0434\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435.\u042f \u0440\u0435\u0448\u0438\u043b \u044d\u0442\u043e \u0438\u043d\u0430\u0447\u0435\u00a0\u2014 \u0447\u0435\u0440\u0435\u0437 mod_zip \u0441\u00a0proxy_pass \u0434\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0412\u00a0\u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u0434\u0435\u043c\u043e, \u0433\u0434\u0435 \u0432\u0441\u0451 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0440\u043e\u0433\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0412\u00a0\u0434\u0435\u043c\u043e\u2011\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u00a0\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430\u0445 \u043a\u043e\u0434\u0430 \u0432\u00a0\u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0431\u0435\u0437\u00a0\u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u041a\u0430\u043a\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 mod_zip\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 HTTP\u2011\u043e\u0442\u0432\u0435\u0442\u044b \u0441\u00a0\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c X-Archive-Files: zip, \u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u0435\u043b\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u0430\u043a\u00a0\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 nginx \u0438 \u0441\u0442\u0440\u0438\u043c\u0438\u0442 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 ZIP\u2011\u0430\u0440\u0445\u0438\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043d\u0430\u00a0\u0434\u0438\u0441\u043a.\u0424\u043e\u0440\u043c\u0430\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430: \u043f\u043e\u00a0\u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043d\u0430\u00a0\u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:&lt;crc32&gt; &lt;\u0440\u0430\u0437\u043c\u0435\u0440_\u0432_\u0431\u0430\u0439\u0442\u0430\u0445&gt; &lt;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url&gt; &lt;\u0438\u043c\u044f_\u0432_\u0430\u0440\u0445\u0438\u0432\u0435&gt; &lt;crc32&gt; &lt;\u0440\u0430\u0437\u043c\u0435\u0440_\u0432_\u0431\u0430\u0439\u0442\u0430\u0445&gt; &lt;\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url&gt; &lt;\u0438\u043c\u044f_\u0432_\u0430\u0440\u0445\u0438\u0432\u0435&gt;\u041f\u0440\u0438\u043c\u0435\u0440:037b3c3a  664   \/local-files\/lorem.txt              lorem.txtb91a4c12  8832  \/local-files\/data.csv               data.csv-         1478  \/proxy-remote\/evanmiller\/mod_zip\/master\/LICENSE  remote\/LICENSE\u041f\u043e\u043b\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439_url \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 location \u0432 nginx.conf. \u041d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 alias \u0434\u043b\u044f\u00a0\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 proxy_pass \u0434\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445. \u041a\u043b\u0438\u0435\u043d\u0442 \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u0432\u0438\u0434\u0438\u0442.\u041f\u043e\u043b\u0435 CRC32\u00a0\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e: \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c &#8212; \u0438 mod_zip \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430\u00a0\u043b\u0435\u0442\u0443. \u041c\u0438\u043d\u0443\u0441: \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Range, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u00a0\u0431\u0443\u0434\u0443\u0442. \u0422\u0430\u043a \u043a\u0430\u043a\u00a0\u0443\u00a0\u043d\u0430\u0441 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430\u00a0\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043f\u043e\u00a0\u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435, \u0442\u043e \u0434\u043b\u044f\u00a0\u043d\u0430\u0441 \u044d\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e. \u041f\u043e\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u043c\u044f \u0432\u00a0\u0430\u0440\u0445\u0438\u0432\u0435\u00a0\u2014 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b. \u0411\u0435\u0437\u00a0\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0430\u0439\u043b\u0430 \u0430\u0440\u0445\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0431\u0438\u0442\u044b\u043c. \u041e\u0431\u00a0\u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u041f\u043e\u0442\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u00a0\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u0430:\u041a\u043b\u0438\u0435\u043d\u0442 \u2514\u2500\u25ba nginx (mod_zip)      \u251c\u2500 \/api\/download\/*  \u2500\u2500\u25ba PHP-FPM (FastCGI)      \u2502                           \u2514\u2500 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 X-Archive-Files      \u2502      \u251c\u2500 [internal] \/local-files\/    \u2500\u2500\u25ba alias \/var\/www\/files\/      \u2514\u2500 [internal] \/proxy-remote\/   \u2500\u2500\u25ba proxy_pass upstream_service\u0420\u043e\u043b\u044c \u0431\u044d\u043a\u0430 (\u0443 \u043d\u0430\u0441 PHP, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c PHP) \u0437\u0434\u0435\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430: \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0441\u00a0\u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438. PHP \u043d\u0435\u00a0\u0432\u0438\u0434\u0438\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435. nginx \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u0438\u0448\u0435\u0442 \u0435\u0433\u043e \u0432\u00a0ZIP\u2011\u043f\u043e\u0442\u043e\u043a.\u041a\u043e\u043d\u0444\u0438\u0433 nginx:# PHP API \u2014 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439location \/api\/ {    fastcgi_pass php:9000;    fastcgi_param SCRIPT_FILENAME \/var\/www\/html\/public\/index.php;    include fastcgi_params;}# \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b: internal &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 nginxlocation \/local-files\/ {    internal;    alias \/var\/www\/files\/;}# \u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b: \u0442\u0430\u043a\u0436\u0435 internal, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441location \/proxy-remote\/ {    internal;    proxy_pass https:\/\/your-external-service.com\/;    rewrite ^\/proxy-remote\/(.*) \/$1 break;}\u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f:public function download(Response $res, array $files): Response{    $lines = [];    foreach ($files as $entry) {        $lines[] = sprintf(            &#8216;%s %d %s %s&#8217;,            $entry[&#8216;crc32&#8217;] ?? &#8216;-&#8216;,            $entry[&#8216;size&#8217;],            $entry[&#8216;internal_url&#8217;],            $entry[&#8216;filename&#8217;]        );    }    $manifest = implode(&#171;\\n&#187;, $lines) . &#171;\\n&#187;;    return $res        -&gt;withHeader(&#8216;X-Archive-Files&#8217;, &#8216;zip&#8217;)        -&gt;withHeader(&#8216;Content-Disposition&#8217;, &#8216;attachment; filename=&#187;documents.zip&#187;&#8216;)        -&gt;withStatus(200)        -&gt;withBody($this-&gt;toStream($manifest));}\u041d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430, ZIP\u2011\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.\u041f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043dZIP\u2011\u0430\u0440\u0445\u0438\u0432 \u044d\u0442\u043e \u043d\u0435\u00a0\u043e\u0434\u0438\u043d \u0441\u0436\u0430\u0442\u044b\u0439 \u0431\u043b\u043e\u0431, \u0430\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u00a0local file header, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u00a0\u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u0436\u0430\u0442\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u00a0\u043a\u043e\u043d\u0446\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 central directory, \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430\u00a0\u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0424\u043e\u0440\u043c\u0430\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438: \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0441\u0442\u0440\u0438\u043c\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u041f\u0440\u0438\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 ZIP \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u00a0HTTP\u2011\u043e\u0442\u0432\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0430\u0434 \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u00a0\u2014 \u0431\u0430\u0439\u0442\u044b \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e\u00a0\u0441\u0435\u0442\u0438.\u0412\u00a0\u0441\u0430\u043c\u043e\u043c ZIP\u2011\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c Data Descriptor (generalPurposeBitFlag=0\u00d70008), \u043a\u043e\u0433\u0434\u0430 \u0432\u00a0local file header \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0443\u043b\u0438 \u0438\u043b\u0438\u00a0\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438 CRC, \u0430\u00a0\u043f\u043e\u0441\u043b\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u043e\u00a0mod_zip \u043f\u0438\u0448\u0435\u0442 local file header \u0434\u043e\u00a0\u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u00a0\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430. \u041a\u00a0\u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d. \u041b\u044e\u0431\u043e\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0441\u0442 \u0431\u0438\u0442\u044b\u0439 \u0430\u0440\u0445\u0438\u0432. \u0414\u043b\u044f\u00a0\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: filesize() \u0432\u00a0PHP. \u0421\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435.\u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u0440\u0438\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Content-Length. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435: \u0431\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0443\u00a0\u0432\u0430\u0441 \u043d\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f\u00a0\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430:private function getRemoteFileSize(string $url): int{    $ctx = stream_context_create([&#8216;http&#8217; =&gt; [        &#8216;method&#8217;          =&gt; &#8216;HEAD&#8217;,        &#8216;timeout&#8217;         =&gt; 5,        &#8216;follow_location&#8217; =&gt; 1,        &#8216;ignore_errors&#8217;   =&gt; true,        &#8216;header&#8217;          =&gt; &#171;User-Agent: your-app\/1.0\\r\\n&#187;,    ]]);    $headers = @get_headers($url, true, $ctx);    if ($headers === false) {        return 0;    }    $cl = $headers[&#8216;Content-Length&#8217;] ?? $headers[&#8216;content-length&#8217;] ?? 0;    if (is_array($cl)) {        $cl = end($cl); \/\/ \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0432    }    return (int) $cl;}\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: PHP \u043d\u0435\u00a0\u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0internal location \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e\u00a0\u2014 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 nginx subrequest, \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 mod_zip. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 internal \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0location \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0433\u043e nginx. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f\u00a0HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u0430 PHP \u0438\u0434\u0451\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a\u00a0\u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u0442\u0430\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u043e\u0434\u0435, \u043d\u043e\u00a0\u0434\u043b\u044f\u00a0\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044f \u0437\u0430\u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u044d\u0442\u043e\u0442 location). \u0421\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 nginx proxy_pass, \u043a\u043e\u0433\u0434\u0430 mod_zip \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 nginx\u2011\u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441.\u041d\u0430\u00a0\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u00a0\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d nginx location\u2011\u043f\u0440\u0435\u0444\u0438\u043a\u0441 (internal, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 API, \u0438\u043b\u0438\u00a0\u0431\u0435\u0437\u00a0\u044d\u0442\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u043e\u043f\u0446\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b). \u0412\u00a0\u0434\u0435\u043c\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u0434\u0438\u043d internal \u0434\u043b\u044f\u00a0GET\u2011\u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 mod_zip, \u043e\u0434\u0438\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0HEAD\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437\u00a0PHP. \u0412\u00a0\u0434\u0435\u043c\u043e \u044f \u043d\u0430\u0437\u0432\u0430\u043b \u0438\u0445 \/proxy-remote\/ \u0438 \/proxy-head\/.\u0415\u0441\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c internal location \u043d\u0430\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u00a0\u0441\u0432\u043e\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u00a0\u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e auth middleware, \u0442\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043e\u0442\u00a0\u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437\u0432\u043d\u0435, \u043d\u0435\u00a0\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0435 \u043f\u043b\u044e\u0441\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u00a0env, \u0411\u0414 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0432\u00a0\u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0412\u00a0\u044d\u0442\u043e\u043c\u00a0\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u043f\u0440\u0438\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 nginx \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u00a0\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0430\u00a0\u0443\u0436\u0435 \u0438\u0437\u00a0\u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u043d\u0430\u00a0\u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445.\u0414\u043e\u00a0\u0438 \u043f\u043e\u0441\u043b\u0435mod_zip + \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432mod_zip + proxy_pass\u0412\u0440\u0435\u043c\u044f \u0434\u043e\u00a0\u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f\u0421\u0440\u0430\u0437\u0443\u041f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443\u041f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u041a\u0411\u0421\u0435\u0442\u044c \u043d\u0430\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443\u0414\u0432\u0430\u0436\u0434\u044b: upstream \u2192 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u2192 \u043a\u043b\u0438\u0435\u043d\u0442\u041e\u0434\u0438\u043d \u0440\u0430\u0437: upstream \u2192 nginx \u2192 \u043a\u043b\u0438\u0435\u043d\u0442\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0434\u0438\u0441\u043a\u043e\u043c \u0438 CPU\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0441\u0435\u0442\u044c\u044e\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, Disk I\/O\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0432\u00a0\u0430\u0440\u0445\u0438\u0432\u0421\u0442\u0440\u0438\u043c\u044f\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 nginx\u0422\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u043a\u00a0\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0449\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a, \u0438 \u043d\u0430\u00a0\u0441\u0435\u0442\u044c \u0432\u0434\u0432\u043e\u0435. \u041c\u0438\u043d\u0443\u0441\u00a0\u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0434\u043b\u044f\u00a0\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c nginx.\u0414\u0435\u0431\u0430\u0433\u0433\u0438\u043d\u0433 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432\u041f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b mod_zip \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0nginx \u0438 \u043d\u0435\u00a0\u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u00a0\u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u00a0\u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u00a0\u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0431\u043e\u0440\u0430 \u043b\u043e\u0433\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u0438\u0434\u0443\u0442 \u043c\u0438\u043c\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041b\u043e\u0433\u043e\u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0435\u00a0\u0431\u0443\u0434\u0435\u0442 \u0432\u00a0Kibana \u0438\u043b\u0438\u00a0\u0438\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435\u00a0\u0442\u0430\u043a, \u0430\u0440\u0445\u0438\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u00a0\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 \u0438 \u0434\u043e\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f nginx.\u0414\u043b\u044f\u00a0\u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e proxy_pass. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 FastCGI\u2011\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430\u00a0\u0442\u043e\u043c, \u043a\u0430\u043a\u00a0nginx \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438. proxy_pass \u0441 internal\u00a0\u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u0442\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432\u00a0\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445).\u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e\u00a0\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 debug\u2011\u043b\u043e\u0433 nginx (\u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0432\u00a0\u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0436\u0435 \u043d\u0435\u0442):error_log \/var\/log\/nginx\/error.log debug;\u0418\u0449\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0438\u0434\u0430:mod_zip: subrequest for &#171;\/proxy-remote\/some\/file.pdf&#187; initiated, result 0mod_zip: subrequest for &#171;\/proxy-remote\/some\/file.pdf&#187; finalized, status 200\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u00abfinalized\u00bb \u0438\u043b\u0438\u00a0\u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0435 200\u00a0\u2014 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u00a0\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.\u0427\u0442\u043e\u00a0\u043f\u043e\u0448\u043b\u043e \u043d\u0435\u00a0\u0442\u0430\u043a\u0412\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u00a0\u0434\u0435\u043c\u043e: \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441\u00a0\u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0440\u043e\u043b\u044f\u043c\u0438 \u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438. \u041b\u043e\u0433\u0438\u043a\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430, \u0435\u0441\u0442\u044c retry\u2011\u043b\u043e\u0433\u0438\u043a\u0430 \u0438 fallback,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-485769","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/485769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=485769"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/485769\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=485769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=485769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=485769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}