{"id":217773,"date":"2014-04-01T02:28:02","date_gmt":"2014-03-31T22:28:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217773"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217773","title":{"rendered":"<span class=\"post_title\">LUA \u0432 nginx: \u043b\u0430\u043f\u0448\u0430\u043a\u043e\u0434 \u0432 \u0441\u0442\u0438\u043b\u0435 inline php<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/435\/ce8\/ddd\/435ce8ddd6c18bd0a3174c9a6a9eeaee.png\" align=\"right\"\/><br \/>  <i>\u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u0432\u0441\u0435\u0440\u044c\u0435\u0437. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u043c \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u043e\u043c \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e. \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0441\u0442 \u043d\u0438 \u0432 \u043a\u043e\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043c\u0435\u0448\u043a\u043e\u0439 \u043d\u0430\u0434 php, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/i><\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430 PHP (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043c\u0435\u043d\u044f) \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0438\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0436\u0443\u0442\u043a\u0443\u044e \u0441\u043c\u0435\u0441\u044c html \u0438 php, \u043d\u0430\u043f\u0438\u0445\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0418 \u0440\u0435\u0447\u044c \u043d\u0435 \u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e \u0432\u0441\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0432 \u043b\u0430\u043f\u0448\u0435\/\u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438-\u043a\u043e\u0434\u0435.<br \/>  \u0418 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0430\u043f\u0440\u0435\u043b\u044f \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e, \u043d\u043e \u043d\u0430 lua \u043f\u043e\u0434 nginx. \u041f\u0440\u044f\u043c\u043e \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u0435 (<a href=\"http:\/\/ater.me\/lml\">\u0441\u0441\u044b\u043b\u043a\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0442\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434<\/a>):  <\/p>\n<pre><code class=\"lua\">&lt;?lml tmpl:include('sugar') ?&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;     &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot;&gt;     &lt;title&gt;\u0421\u0435\u0439\u0447\u0430\u0441 &lt;?lml print(ngx.utctime()) ?&gt;&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;?lml local alc = require('lib.alc') ?&gt; \u041f\u0440\u0438\u0432\u0435\u0442, &lt;?lml print(esc(req:get('name', 'traveler')), '\/', ngx.var.remote_addr) ?&gt;. \u042d\u0442\u043e \u0443\u0436\u0435 &lt;?lml print(alc:inc('cnt')) ?&gt; \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.  &lt;?lml     local hdrs = {}     for k,v in pairs(ngx.req.get_headers()) do         table.insert(hdrs, '&lt;tr&gt;&lt;td style=&quot;font-weight:bold;&quot;&gt;'..esc(k)..'&lt;\/td&gt;&lt;td&gt;'..esc(v)..'&lt;\/td&gt;&lt;\/tr&gt;')     end ?&gt;  &lt;h3&gt;\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 &lt;?lml print(ngx.req.get_method()) ?&gt; \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a &lt;?lml print(esc(ngx.var.request_uri)) ?&gt;&lt;\/h3&gt; &lt;table&gt;&lt;?lml print(hdrs) ?&gt;&lt;\/table&gt;  &lt;?lml include('footer') ?&gt; <\/code><\/pre>\n<p>  \u0422.\u0435. \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 lua \u0432 \u043b\u0430\u043f\u0448\u0430\u0441\u0442\u0438\u043b\u0435. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b:  <\/p>\n<ul>\n<li>\u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u00ab\u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u00bb;<\/li>\n<li>\u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 APC: \u0432\u0441\u044f\u043a\u0438\u0435 store\/fetch\/cas \u0438 \u0442.\u043f. + compile_string\/compile_file \u0434\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432;<\/li>\n<li>ob_* \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438);<\/li>\n<li>\u0432\u0441\u044f\u043a\u0430\u044f \u043c\u0435\u043b\u043e\u0447\u044c \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b htmlspecialchars, $_GET[name] \u0438 \u0442.\u043f.<\/li>\n<\/ul>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043c\u0443-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u043e\u043c\u0443 \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0434 \u2014 \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 <a href=\"https:\/\/github.com\/AterCattus\/luaghetti\">github<\/a>, \u0445\u043e\u0442\u044c \u0442\u0430\u043c \u043a\u043e\u0434\u0430 \u0438 \u043a\u043e\u0442 \u043d\u0430\u043f\u043b\u0430\u043a\u0430\u043b.<\/p>\n<p>  \u0412\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c:  <\/p>\n<ul>\n<li>LUA \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432 runtime \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 function (callable \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 php\/java)). \u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"http:\/\/luatut.com\/dofile.html\">loadstring<\/a>;<\/li>\n<li>\u0414\u043b\u044f \u0438\u043c\u0435\u044e\u0449\u0435\u0439\u0441\u044f function \u043c\u043e\u0436\u043d\u043e \u0432 runtime \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u0431\u0430\u0439\u0442\u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 <a href=\"http:\/\/www.lua.ru\/doc\/5.4.html\">string.dump<\/a>;<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c function \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0438\u0437 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0442\u0443 \u0436\u0435 loadstring;<\/li>\n<li>\u0414\u043b\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/chaoslawful\/lua-nginx-module#ngxshareddict\">ngx.shared.DICT<\/a>, \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/215237\/\">\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b<\/a> <a href=\"http:\/\/habrahabr.ru\/post\/215235\/\">\u0440\u0430\u043d\u0435\u0435<\/a>;<\/li>\n<li>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0447\u0443-\u0432\u0435\u0440\u0447\u0443 \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0435\u0434\u0438\u043d\u043e.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c nginx:  <\/p>\n<pre><code class=\"nginx\">http {     lua_shared_dict lml_shared 10m;     lua_package_path '\/path\/to\/lml\/?.lua;;'; }  # \u0438\u043c\u044f location \u0438 \u043f\u0443\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c, \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438 location \/lml {     # \u0433\u0440\u0443\u0437\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d index (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u044d\u0442\u043e \u0444\u0430\u0439\u043b \/path\/to\/lml\/tmpl\/index.lml)     content_by_lua '         local tmpl = require &quot;lib.tmpl&quot;         tmpl:set_root(&quot;\/path\/to\/lml\/tmpl\/&quot;)         tmpl:include(&quot;index&quot;)     '; } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f: \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0435 \u0442\u0435\u0433\u043e\u0432 &lt;?lml ?&gt; \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 stdout:print(\u0422\u0415\u041a\u0421\u0422), \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0435\u0433\u043e\u0432 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u0435\u0433\u043e\u0432. HTML \u0442\u0435\u043a\u0441\u0442 \u0432 print \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432\u043d\u0443\u0442\u0440\u0438:  <\/p>\n<pre><code class=\"lua\">stdout:print([[Hello world ]]) <\/code><\/pre>\n<p>  \u041d\u043e, \u0442.\u043a. \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u043d\u0438\u0446 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430(Hello [[&lt;?lml ?&gt;]] World), \u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0438\u0449\u0435\u0442 \u00ab\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439\u00bb \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0433\u0440\u0430\u043d\u0438\u0446 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430, \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u044f \u0435\u0433\u043e \u0434\u043b\u0438\u043d\u0443:  <\/p>\n<pre><code class=\"lua\">print([[...]]) print([=[...]=]) print([==[...]==]) ... <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432 \u0431\u0430\u0439\u0442\u043a\u043e\u0434 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 php \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0430 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0432 \u043e\u043f\u043a\u043e\u0434 \u043a\u0435\u0448\u0435\u0440, \u0431\u0435\u0441\u0445\u0438\u0442\u0440\u043e\u0441\u0442\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0439 ALC (<a href=\"http:\/\/www.php.net\/manual\/en\/book.apc.php\">Alternative Lua Cache<\/a>).<br \/>  \u0412 \u0441\u0430\u043c\u043e\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a (\u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f! \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0435\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440):  <\/p>\n<pre><code class=\"lua\">function M:compile_string(str, filename)     local cache_key = 'tmpl_bytecode:' .. filename     local bytecode, created_at = cache:get(cache_key)      local lua_func = nil      if not bytecode then         locked = cache:add(key_lock, 1, key_lock_ttl)         bytecode, created_at = cache:get(cache_key)          if not bytecode then             if type(str) == 'function' then                 str = str(filename)             end             lua_func = assert(loadstring(str, filename))             bytecode = assert(string.dump(lua_func))         end          if locked then             if lua_func and bytecode then                 cache:set(cache_key, bytecode, 0, ngx.now())             end             cache:delete(key_lock)         end     end      if (not lua_func) and bytecode then         lua_func = loadstring(bytecode, filename)     end      return lua_func end <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 lua \u043a\u043e\u0434\u043e\u043c, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c function, \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043a\u0435 \u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u043b\u0435\u0436\u0438\u0442 \u0431\u0430\u0439\u0442\u043a\u043e\u0434.<\/p>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0439\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u0432 \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code class=\"lua\">local function _include_string(str, filename)     local lua_func = alc:compile_string(str, filename)     if lua_func then         lua_func()     end end  function M:include_string(str, filename)     local succ, err = pcall(_include_string, str, filename)     if not succ then         ngx.status = ngx.HTTP_INTERNAL_SERVER_ERROR          local errstr = 'Error (' .. filename .. '): ' .. err         ngx.log(ngx.ERR, errstr)         ngx.say(errstr)         return ngx.exit(ngx.HTTP_OK)     end     return succ end  -- \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 (\u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0438 location nginx'\u0430): function M:include(name)     local path = root_path .. name .. file_ext      M:include_string(         function(filename)             local str = assert(file:read_all(filename))             return assert(parse_tmpl(str, filename))         end,         path     ) end <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0432 alc:compile_string \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0438\u0441\u043a\u0443 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0431\u0430\u0439\u0442\u043a\u043e\u0434 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u043a\u0435\u0448\u0435. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043b\u0435\u043d\u0438\u0432\u0443\u044e \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0412\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043f\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u043c: \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0432 lib.tmpl, \u043a\u0435\u0448\u0435\u0440 \u0432 lib.alc, \u0432\u044b\u0432\u043e\u0434 \u0438 \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 lib.stdout \u0438 \u0442.\u0434. \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u0430\u044f \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043f\u043e \u043f\u043e\u043b\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0430\u043c:  <\/p>\n<pre><code class=\"lua\">-- \u043d\u0435\u043a\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d example.lml &lt;?lml local stdout = require('lib.stdout') local html = require('lib.html') local tmpl = require('lib.tmpl')  tmpl:include('header')  stdout:print(html:escape(ngx.var.request_uri)) ?&gt; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u044f\u0432\u043d\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u00ab\u0441\u0430\u0445\u0430\u0440\u0430\u00bb \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0441 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:  <\/p>\n<pre><code class=\"lua\">local required_libs = {'stdout', 'html', 'req', 'tmpl'}  -- tmpl_chunks \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0443\u0441\u043a\u0438 lua \u043a\u043e\u0434\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 lml \u0448\u0430\u0431\u043b\u043e\u043d\u0430  -- \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0443 \u0432\u0441\u0435\u0445 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 for _,l in ipairs(required_libs) do     table.insert(tmpl_chunks, 1, 'local '..l..' = require(&quot;lib.'..l..'&quot;);') end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435:  <\/p>\n<pre><code class=\"lua\">-- \u043d\u0435\u043a\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d example.lml &lt;?lml tmpl:include('header')  stdout:print(html:escape(ngx.var.request_uri)) ?&gt; <\/code><\/pre>\n<p>  \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0441\u043b\u0430\u0449\u0435\u043d\u044b \u0435\u0449\u0435 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a stdout:print, tmpl:include, html:escape. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 lml \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432:  <\/p>\n<pre><code class=\"lua\">-- sugar.lml &lt;?lml function include(...)     tmpl:include(...) end  function print(...)     stdout:print(...) end  function esc(...)     return html:escape(...) end ?&gt;  -- \u043d\u0435\u043a\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d example.lml &lt;?lml tmpl:include('sugar') include('header')  print(esc(ngx.var.request_uri)) ?&gt; <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043b\u043a\u043e\u0439 \u043e \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0431\u043b\u0438\u0436\u0435 \u043a \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u043a\u0435 php.<\/p>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 php-fpm+apc \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u00ab\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0430\u0447\u043a\u0435\u00bb \u0441 Athlon II, <a href=\"http:\/\/ater.me\/lml\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439<\/a> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0441\u0442\u0430.<br \/>  \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0441\u043e \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c php \u043a\u043e\u0434\u043e\u043c \u0438\u0437 3\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439.<br \/>  \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0447\u0435\u0440\u0435\u0437 siege \u043f\u043e 100\u041c\u0431\u0438\u0442 \u043b\u043e\u043a\u0430\u043b\u043a\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043e\u0435 \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0432 \u0441\u0435\u0442\u043a\u0443.<br \/>  \u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 siege -cX -t300S -b URL \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 trans\/sec:  <\/p>\n<table>\n<tr>\n<th>&nbsp;<\/th>\n<th>-c10<\/th>\n<th>-c100<\/th>\n<th>-c200<\/th>\n<th>-c500<\/th>\n<\/tr>\n<tr>\n<td>php-fpm<\/td>\n<td>3350<\/td>\n<td>3150 \u0443\u043f\u0435\u0440\u0441\u044f \u0432 cpu<\/td>\n<td>http 502 *<\/td>\n<td>http 502 *<\/td>\n<\/tr>\n<tr>\n<td>lml \u0431\u0435\u0437 \u043e\u043f\u043a\u0435\u0448\u0435\u0440\u0430<\/td>\n<td>\u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u043b<\/td>\n<td>6950<\/td>\n<td>\u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u043b<\/td>\n<td>\u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u043b<\/td>\n<\/tr>\n<tr>\n<td>lml \u0441 \u043e\u043f\u043a\u0435\u0448\u0435\u0440\u043e\u043c<\/td>\n<td>7000<\/td>\n<td>8100 \u0443\u043f\u0435\u0440\u0441\u044f \u0432 if<\/td>\n<td>8200 \u0443\u043f\u0435\u0440\u0441\u044f \u0432 if<\/td>\n<td>7500 \u0443\u043f\u0435\u0440\u0441\u044f \u0432 if<\/td>\n<\/tr>\n<\/table>\n<p>  <i>* \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 connect() to unix:\/var\/run\/php-fpm-*.sock failed (11: Resource temporarily unavailable)<\/i><\/p>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438 \u0443\u0436\u0430\u0441\u043d\u043e.<\/p>\n<p>  \u0415\u0449\u0435 \u0440\u0430\u0437 <a href=\"https:\/\/github.com\/AterCattus\/luaghetti\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 github<\/a>, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0443\u043f\u0443\u0441\u0442\u0438\u043b \u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b \u0441 \u043a\u043e\u043d\u0446\u0430, \u043d\u043e \u0445\u043e\u0447\u0435\u0442 \u0433\u0440\u044f\u043d\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <b>\u0412\u0441\u0435\u043c \u0436\u0435\u043b\u0430\u044e \u043d\u0435 \u043f\u043e\u0434\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0432\u043e\u043a\u0430\u0446\u0438\u0438 \ud83d\ude42<\/b>    \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\/217773\/\"> http:\/\/habrahabr.ru\/post\/217773\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/435\/ce8\/ddd\/435ce8ddd6c18bd0a3174c9a6a9eeaee.png\" align=\"right\"\/><br \/>  <i>\u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u0432\u0441\u0435\u0440\u044c\u0435\u0437. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u043c \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u043e\u043c \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e. \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0441\u0442 \u043d\u0438 \u0432 \u043a\u043e\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043c\u0435\u0448\u043a\u043e\u0439 \u043d\u0430\u0434 php, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/i><\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430 PHP (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043c\u0435\u043d\u044f) \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0438\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0436\u0443\u0442\u043a\u0443\u044e \u0441\u043c\u0435\u0441\u044c html \u0438 php, \u043d\u0430\u043f\u0438\u0445\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0418 \u0440\u0435\u0447\u044c \u043d\u0435 \u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043e \u0432\u0441\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0432 \u043b\u0430\u043f\u0448\u0435\/\u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438-\u043a\u043e\u0434\u0435.<br \/>  \u0418 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0430\u043f\u0440\u0435\u043b\u044f \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0433\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e, \u043d\u043e \u043d\u0430 lua \u043f\u043e\u0434 nginx. \u041f\u0440\u044f\u043c\u043e \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435.  <\/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-217773","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217773","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=217773"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217773\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}