{"id":196654,"date":"2013-10-07T17:55:03","date_gmt":"2013-10-07T13:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=196654"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=196654","title":{"rendered":"<span class=\"post_title\">\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u00ab\u043a\u0430\u043f\u0447\u0430\u00bb<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u00ab\u0440\u043e\u0431\u043e\u0442\u043e\u0432\u00bb \u0438 \u00ab\u0431\u043e\u0442\u043e\u0432\u00bb \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u00ab\u043a\u0430\u043f\u0447\u0438\u00bb \u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0438 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u00ab\u043a\u0430\u043f\u0447\u0443\u00bb \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u043e \u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u00ab\u043a\u0430\u043f\u0447\u0435\u0439\u00bb \u0438 \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0451, \u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u0435\u0451 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0443\u0436\u0435 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u044b. \u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u00ab\u043a\u0430\u043f\u0447\u0438\u00bb \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b, \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<a name=\"habracut\"><\/a>, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u00ab\u043a\u0430\u043f\u0447\u00bb \u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c;<\/li>\n<li>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u00ab\u043a\u0430\u043f\u0447\u0443\u00bb \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043b\u0438\u0431\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u00ab\u043a\u0430\u043f\u0447\u0438\u00bb, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0441\u043c\u043e\u0433 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0439 \u0442\u0435\u043a\u0441\u0442);<\/li>\n<li>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u00ab\u043a\u0430\u043f\u0447\u00bb (\u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 cookies \u044f \u043d\u0435 \u0431\u0443\u0434\u0443);<\/li>\n<li>\u00ab\u043a\u0430\u043f\u0447\u0430\u00bb \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u0430\u044f, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043c\u044b \u0435\u0451 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b;<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u043a\u0438\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043f\u0447\u0443.  <\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 1 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0435<\/h5>\n<p>  <\/p>\n<h6>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/h6>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/88d\/d1a\/f4a\/88dd1af4a885620f7e9922b7df03c408.png\" alt=\"image\"\/>  <\/p>\n<h6>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a<\/h6>\n<ul>\n<li>\/spool\/projects\/capcha\/ \u2014 root \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/li>\n<\/ul>\n<h6>index.html<\/h6>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0444\u043e\u0440\u043c\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0447\u0435\u0440\u0435\u0437 SSI \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \/capches\/. \u0418\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f ngx_http_random_index_module.<\/p>\n<pre><code class=\"html\">&lt;html&gt; &lt;body&gt;     &lt;form action=&quot;\/download&quot; method=&quot;GET&quot;&gt;         &lt;!--#include virtual=&quot;\/capches\/&quot;--&gt;         &lt;input type=&quot;text&quot; name=&quot;code&quot; value=&quot;&quot;&gt;         &lt;input type=&quot;submit&quot;&gt;     &lt;\/form&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<h6>\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0430\u043f\u043a\u0435 capches<\/h6>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u044b:<\/p>\n<pre><code class=\"html\">&lt;img src=&quot;data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA8AgMAAADQw5Y7AAAACVBMVEX\/\/\/8AAAAAyMjozb6ZAAAB 50lEQVQ4jYWVS27DIBCGx0hUhLWVNa1aifYUTU5AJFuqukp3PQbNKgfIAVhGPmXnAW5SWR4jJ5hv GP4ZXjCtPnACBxFfA+Az0HMFCNjg8X2CM9apRG6nB608WlPxjDMULEY6A1fxIxMuQBV8qT8AmXjg DmxQ6IcK1sBPE46AxjIgEoaOtGUwaEFv4QY0YOyqeHGPrkW2m7FIr9pKFS7YsfRZW1XGulzDhroW wVwLDUeKi0Ik39OUyXtEjCF5xKGpQ6dvGSZgmeJTsGfz2ALznM4ouEovrBiAIzC18TTj3LTx\/x0O om6OO4iB4BoZa6MpiTC3nHg5BJM9J5YDk2oxvBwE18R6VtYS2nBTR9pkHfCn4ACzuszKSmto2MtX jZvrUfBZ3LCNI+yEOLE\/V2Eynr\/+6Qo3uHSD6x\/HwSaT3IiR3uNsbRyyufSXLm12R\/iPt90X4j49 22QhLeBjn31KEVK30NtaxJv3wwckM4YbXDjIzeG4zRaGnnp\/cypoJlpvQ86RWVgc+4HwJ6SXZWxt 6H\/20PfL0rrhddztM4Y1+jtpkjVJ6tXLbP7P2krO12ZMmW91tShrTV2pK+tc2SXqHlN36Nr+Vk4H 5WxRTiblXFNOReVMVU\/ktfNcuQ2Uu0S5iZR7bP2S\/AWn1wwm+CZwIQAAAABJRU5ErkJggg== &quot;&gt; &lt;input type=&quot;hidden&quot; name=&quot;md5&quot; value=&quot;IODn35yg2gLtnSRhyKyK6g&quot;&gt; &lt;input type=&quot;hidden&quot; name=&quot;key&quot; value=&quot;5e12c2002a0370826a9dee5f6a55f5e3&quot;&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u0430\u043f\u0447\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u044b \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043a\u0430\u043a data:image\/png;base64. key \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, md5 \u2014 \u044d\u0442\u043e md5 (base64) \u0441\u0443\u043c\u043c\u0430 \u043e\u0442: key + \u043a\u043e\u0434 \u043d\u0430 \u043a\u0430\u043f\u0447\u0435 + \u0441\u043e\u043b\u044c.<\/p>\n<h6>\u041a\u043e\u043d\u0444\u0438\u0433 nginx<\/h6>\n<pre><code class=\"nginx\">server {     listen                      80;     server_name                 capcha.local;      root                        \/spool\/projects\/capcha\/;     index                       index.shtml;      location \/ {         ssi                     on;     }     location \/capches\/ {         random_index            on;     }     location \/download {         proxy_pass              %backend_uri%;     }     location \/file {         deny all;     } } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<ul>\n<li>\u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e location \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c SSI \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b;<\/li>\n<li>\u0434\u043b\u044f location \/capches\/ \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441;<\/li>\n<li>location \/download \u2014 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u0431\u0435\u043a\u0435\u043d\u0434;<\/li>\n<li>\u0434\u043b\u044f location \/file \u2014 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f, \u0447\u0442\u043e \u0431\u044b \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b.<\/li>\n<\/ul>\n<h6>\u041f\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u0435\u0439 \u0444\u043e\u0440\u043c<\/h6>\n<p>  \u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u0441\u044f \u043a\u0430\u043f\u0447\u0430 \u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e. \u042f \u0432\u0437\u044f\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u043f\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c GD::SecurityImage \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/p>\n<pre><code class=\"perl\">#!\/usr\/bin\/perl use uni::perl; use GD::SecurityImage; use Digest::MD5 qw|md5_base64 md5_hex|; use MIME::Base64; # \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: my $root_dir    = '\/spool\/projects\/capcha'; my $salt        = 'salt'; my $img_limit   = 10; # \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0444\u043e\u0440\u043c my $counter = 0; $counter++ foreach &lt;$root_dir\/capches\/*&gt;; while ($counter &lt; $img_limit) {     my ($image_data, $mime_type, $random_number) = GD::SecurityImage         -&gt;new(width =&gt; 120, height =&gt; 60, gd_font =&gt; 'giant')             -&gt;random                 -&gt;create('normal', 'circle', '#000000', '#00c8c8')                     -&gt;out;     my $filename = md5_hex(rand);     my $encoded_image = encode_base64($image_data);     my $md5 = md5_base64($filename.' '.$random_number.' '.$salt);     next if $md5 =~ \/[\\+\\\/]\/; # \u043d\u0430\u043c \u043d\u0430\u0434\u043e base64url \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0432 Digest::MD5 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435\u0442, \u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c - \u043b\u0435\u043d\u044c     open (my $form_fh, '&gt;', $root_dir.'\/forms\/'.$filename.'.html') or die $!;         print $form_fh '&lt;img src=&quot;data:image\/'.$mime_type.';base64,'.$encoded_image.'&quot;&gt;             &lt;input type=&quot;hidden&quot; name=&quot;md5&quot; value=&quot;'.$md5.'&quot;&gt;             &lt;input type=&quot;hidden&quot; name=&quot;key&quot; value=&quot;'.$filename.'&quot;&gt;';     close $form_fh;     $counter++; }  1; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 key, \u0447\u0442\u043e \u0431\u044b \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438.<\/p>\n<h6>\u041e\u0442\u0434\u0430\u0447\u0430 \u0444\u0430\u0439\u043b\u0430<\/h6>\n<p>  \u0427\u0430\u0441\u0442\u044c \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u0430\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u043e\u0440\u043c\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0443\u043c\u043c\u0443 md5, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0444\u043e\u0440\u043c\u044b, \u043e\u0442\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u2026<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 2 \u2014 pure nginx<\/h5>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0438\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u041d\u0415 \u041f\u041e\u041d\u0418\u041c\u0410\u0415\u0422\u0415 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u0436\u0435 \u041d\u0415 \u043f\u044b\u0442\u0430\u0439\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0422\u0435, \u043a\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438 \u0441\u0430\u043c\u0438 \u043f\u043e\u0439\u043c\u0443\u0442, \u043d\u0430\u0434\u043e \u043b\u0438 \u0438\u043c \u044d\u0442\u043e.<\/p>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442, \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 nginx. \u0418\u0442\u0430\u043a\u2026<\/p>\n<p>  \u041e\u0442\u0434\u0430\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439: \u0432\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0444\u0430\u0439\u043b \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0444\u043e\u0440\u043c\u044b \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0438 \u043c\u044b \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u043b\u0438. \u041e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u044d\u0442\u043e nginx \u0443\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c md5 \u0441\u0443\u043c\u043c\u0443 \u2014 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c ngx_http_secure_link_module. \u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f ngx_http_dav_module, \u043d\u043e \u0442\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 GET \u043d\u0430 DELETE, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0444\u043e\u0440\u043c\u044b \u0435\u0449\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c ngx_http_proxy_module \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c X-Accel-Redirect. \u0415\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f ngx_http_map_module.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0444\u043e\u0440\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u0430\u0439\u043b\u0430 hidden \u043f\u043e\u043b\u0435 file \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0436\u0435\u043c \u0430\u043b\u0438\u0430\u0441 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u043a\u0438:<\/p>\n<pre><code class=\"html\">&lt;html&gt; &lt;body&gt;     &lt;form action=&quot;\/download&quot; method=&quot;GET&quot;&gt;         &lt;!--#include virtual=&quot;\/capches\/&quot;--&gt;         &lt;input type=&quot;hidden&quot; name=&quot;file&quot; value=&quot;arch1&quot;&gt;         &lt;input type=&quot;text&quot; name=&quot;code&quot; value=&quot;&quot;&gt;         &lt;input type=&quot;submit&quot;&gt;     &lt;\/form&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0430\u043f\u043a\u0438 capches \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 dav: ln -s \/spool\/projects\/capcha\/capches \/spool\/projects\/capcha\/dav<\/p>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433 nginx \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"nginx\"># \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u043b\u0438\u0430\u0441\u043e\u0432 \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u0432 map $file_alias $filename {     default                         'fail';     'arch1'                         'archive1.zip';     'arch2'                         'archive2.zip';     'arch3'                         'archive3.zip'; }  server {     listen                      80;     server_name                 captcha.local;      root                        \/spool\/projects\/capcha\/;     index                       index.shtml;      location \/ {         ssi                     on;     }     location \/capches\/ {         random_index            on;     }     location \/download {         # \u0423\u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e GET         if ($request_method != 'GET') {             return              301         \/fail;         }         # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0431\u0435\u0437 \u0441\u043f\u0435\u0446 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b         if ($arg_key !~ '^\\w+$') {             return              301         \/fail;         }         # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c md5 \u0441\u0443\u043c\u043c\u0443         secure_link             $arg_md5;         secure_link_md5         &quot;$arg_key $arg_code salt&quot;;         if ($secure_link = &quot;&quot;) {             return              301         \/fail;         }         if ($secure_link = &quot;0&quot;) {             return              301         \/fail;         }         # \u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f $file_alias \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f $filename         set                     $file_alias $arg_file;         proxy_intercept_errors  on;         # \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 location \/dav \u0441 \u043f\u043e\u0434\u043c\u0435\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 DELETE \u0438 URI \u043d\u0430 \u0438\u043c\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0447\u0430\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u044b         proxy_pass              http:\/\/127.0.0.1\/dav\/$arg_key.html;         proxy_method            DELETE;         proxy_set_header        Host        $host;         # \u0422\u0430\u043a \u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0440\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0436\u0435\u043c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e         proxy_set_header        X-File      $filename;     }     location \/dav\/ {         # \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 dav -&gt; capches \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e location, \u0432\u043f\u0440\u043e\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 rewrite, \u043d\u0430 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f         # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e \u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0439 location \u043d\u0435 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437\u0432\u043d\u0435, \u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f         allow                   127.0.0.1; # \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 IP         deny                    all;         # \u041c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c         dav_methods             DELETE;         # \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043e\u0442\u0434\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 location \/file\/ \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430         add_header              X-Accel-Redirect        &quot;\/file\/$http_x_file&quot;;         # \u0442\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0438\u043c\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u0447\u0442\u043e \u0431\u044b \u0444\u0430\u0439\u043b \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c         add_header              Content-Disposition     &quot;attachment; filename=\\&quot;$http_x_file\\&quot;&quot;;         # \u0438\u043d\u0430\u0447\u0435 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u0448\u0438\u0431\u043a\u0438         error_page              403 404                 =301 \/fail;     }     location \/file {         # location \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0443         internal;         # \u041f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043e\u0442\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0442\u0443         try_files               $uri        =204;     }     location \/fail {         return                  200         'FAIL CODE';     } } <\/code><\/pre>\n<p>  \u0418 \u0434\u0430, \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c ngx_http_perl_module, \u0438 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 Perl, \u043d\u043e, \u043a\u0430\u043a \u044f \u0441\u043a\u0430\u0437\u0430\u043b \u0432\u044b\u0448\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445, \u0447\u0442\u043e \u0431\u044b \u0440\u0430\u0437\u0432\u0438\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u0414\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u043f\u0447\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0451 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 nginx \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c backend, \u043d\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0430\u0439\u043b \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0444\u043e\u0440\u043c\u044b \u0434\u0432\u0443\u043c \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0441\u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d, \u043a\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0432\u0435\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434;<\/li>\n<li>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u00ab\u043a\u0430\u043f\u0447\u00bb;<\/li>\n<li>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u0435\u043c\u044b;<\/li>\n<\/ul>\n<p>  \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f <a href=\"http:\/\/doc.prototypes.ru\/server\/nginx\/ngx_http_random_index_module\/capcha\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h5>P.S.<\/h5>\n<p>  \u041a\u0430\u043a \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0444\u043e\u0440\u043c\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438), \u044f, \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u043d\u0435 \u0434\u0443\u043c\u0430\u043b, \u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/196654\/\"> http:\/\/habrahabr.ru\/post\/196654\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u00ab\u0440\u043e\u0431\u043e\u0442\u043e\u0432\u00bb \u0438 \u00ab\u0431\u043e\u0442\u043e\u0432\u00bb \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u00ab\u043a\u0430\u043f\u0447\u0438\u00bb \u043d\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0438 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u00ab\u043a\u0430\u043f\u0447\u0443\u00bb \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u043e \u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u00ab\u043a\u0430\u043f\u0447\u0435\u0439\u00bb \u0438 \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0451, \u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u0435\u0451 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0443\u0436\u0435 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u044b. \u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u00ab\u043a\u0430\u043f\u0447\u0438\u00bb \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b, \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-196654","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196654","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=196654"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196654\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}