{"id":309300,"date":"2020-09-01T15:00:57","date_gmt":"2020-09-01T15:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309300"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-09-01T15:00:57","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309300","title":{"rendered":"\u042d\u0442\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0431\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516654\/\">\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440. \u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0436\u0438\u043b \u0441\u0430\u0439\u0442, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, <i>example.com<\/i>. <br \/>  \u0428\u043b\u043e \u0432\u0440\u0435\u043c\u044f, \u0441\u0430\u0439\u0442 \u0440\u043e\u0441, \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u043c\u0443 \u0441\u0442\u0430\u043b\u043e \u043c\u0430\u043b\u043e, \u0434\u0430 \u0435\u0449\u0451 \u0438 \u0440\u0435\u0431\u0440\u0435\u043d\u0434\u0438\u043d\u0433\u0430 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0418 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c, \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, <i>example2.com<\/i>.<\/p>\n<p>  \u0422\u0430\u043a \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 <i>Nginx<\/i> \u0441 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u043c <i>example2.com<\/i> \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c <i>example.com<\/i>, \u0438 \u0432 <i>\/etc\/hostname<\/i> \u043d\u0430 \u044d\u0442\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f <i>example.com<\/i> \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0435\u0436\u043d\u044f\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u0430\u044f \u0410-\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0414\u041d\u0421.<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, <i>uptime<\/i> \u0440\u043e\u0441, \u0430 \u0441\u0430\u0439\u0442 \u0432\u0441\u0451 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0440\u0435\u0431\u0440\u0435\u043d\u0434\u0438\u043d\u0433 \u0438 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u043d\u0430 <i>example2.wtf<\/i>. \u0413\u043e\u0442\u043e\u0432\u044f\u0441\u044c \u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u0448\u0435\u043b \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u043c\u0435\u043d\u0438\u043b \u0432 <i>\/etc\/hostname<\/i> \u0441\u0442\u0440\u043e\u043a\u0443 <i>example2.com<\/i> \u043d\u0430 <i>example2.wtf<\/i>, \u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430, \u0434\u0435\u043b\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0448\u043b\u043e \u0438 \u0437\u043e\u043d\u0443 \u0441\u0430\u0439\u0442\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0436\u043d\u0435\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u043d\u0444\u0438\u0433\u0438 <i>Nginx<\/i> \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c. \u041d\u043e \u0438 \u0432 <i>\/etc\/hostname<\/i> \u043f\u0440\u0435\u0436\u043d\u044e\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u0438. <\/p>\n<p>  \u041d\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0436\u0435 \u044d\u0442\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0431\u0438\u0442\u044c <i>Nginx<\/i>!<br \/>  \u0418\u043b\u0438 \u0432\u0441\u0451 \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u0435\u0442?<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435:<\/p>\n<pre><code class=\"bash\">$ head -1 \/etc\/*release PRETTY_NAME=&quot;Debian GNU\/Linux 10 (buster)&quot; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ nginx -v nginx version: nginx\/1.19.2 <\/code><\/pre>\n<p>  <i>Uptime<\/i> \u0440\u043e\u0441 \u0434\u0430\u043b\u044c\u0448\u0435, \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432\u0441\u0451 \u0442\u0430\u043a\u0436\u0435 \u0431\u0435\u0437\u043e\u0442\u043a\u0430\u0437\u043d\u043e, \u043d\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u0435\u043d\u044c \u043a\u043e\u0433\u0434\u0430 \u0442\u043e \u043b\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e \u043b\u0438 \u043f\u0440\u043e\u043f\u0430\u043b\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0435, \u0432 \u043e\u0431\u0449\u0435\u043c \u043d\u0435 \u0432\u0430\u0436\u043d\u043e. \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0438 <i>Nginx<\/i> \u043d\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e, \u043d\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u043b, \u043e\u0434\u043d\u0430\u043a\u043e:<\/p>\n<pre><code class=\"bash\">$ nginx -t nginx: [emerg] host not found in upstream &quot;example&quot; in \/nginx\/vhosts\/example2.com:9 nginx: configuration file \/etc\/nginx\/nginx.conf test failed <\/code><\/pre>\n<p>  \u00ab\u0420\u0430\u0431\u043e\u0447\u0438\u0435\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u0438 <i>Nginx<\/i> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"bash\">$ cat \/etc\/nginx\/nginx.conf user www-data;  worker_processes  1;  error_log  \/var\/log\/nginx\/error.log;  events { }  http {   log_format domainlog '$scheme\\t$server_name\\t$host\\t$upstream_addr\\t$status\\t$upstream_status';    include       mime.types;   default_type  application\/octet-stream;     include \/nginx\/upstream\/*;   include \/nginx\/vhosts\/*; } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\"> $ cat \/nginx\/vhosts\/example2.com server {    listen 80;    server_name example2.com;   access_log \/var\/log\/nginx\/access\/example2.com domainlog;    location \/ {     proxy_pass http:\/\/example;     proxy_set_header Host $host;   } } <\/code><\/pre>\n<pre><code class=\"bash\">$ cat \/nginx\/upstreams\/example2.com upstream example {   server 93.184.216.34:80; } <\/code><\/pre>\n<p>  \u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0432\u0437\u044f\u043b \u0441\u043b\u043e\u0432\u043e \u00ab\u0440\u0430\u0431\u043e\u0447\u0438\u0435\u00bb \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u042d\u0442\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u0435 <b><i>s<\/i><\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8fb\/aa1\/525\/8fbaa15257077bae87b329209a6b8025.png\" alt=\"image\"><\/p>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0448\u0438\u0445 \u043a \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <i>Nginx<\/i> \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0443\u0442\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u00ab\u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0443\u00bb, \u0445\u043e\u0442\u044f \u043e\u043d\u0430 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e. \u0418, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, <i>Nginx<\/i> \u0437\u043d\u0430\u0435\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/98c\/b72\/d03\/98cb72d037fbf68ff3da0c208b42fd1b.png\" alt=\"image\"><\/p>\n<pre><code class=\"bash\">$ strace nginx -t 2&gt;&amp;1 | grep -F &quot;ENOENT&quot; access(&quot;\/etc\/ld.so.preload&quot;, R_OK)      = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, &quot;\/nginx\/upstream&quot;, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory) connect(6, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) connect(5, {sa_family=AF_UNIX, sun_path=&quot;\/var\/run\/nscd\/socket&quot;}, 110) = -1 ENOENT (No such file or directory) <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u0430\u0434\u043e\u043a <i>strace<\/i>, \u043c\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u00ab\u043e\u0431\u043b\u0435\u0433\u0447\u0438\u043c\u00bb <i>Nginx<\/i>, \u0441\u043e\u0431\u0440\u0430\u0432 \u0435\u0433\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">$ nginx -V nginx version: nginx\/1.19.2 built by gcc 8.3.0 (Debian 8.3.0-6) configure arguments: --prefix=\/usr\/share\/nginx --sbin-path=\/usr\/sbin\/nginx --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/run\/nginx.pid --without-http_charset_module --without-http_gzip_module --without-http_ssi_module --without-http_userid_module --without-http_access_module --without-http_auth_basic_module --without-http_mirror_module --without-http_autoindex_module --without-http_geo_module --without-http_map_module --without-http_split_clients_module --without-http_referer_module --without-http_rewrite_module --without-http_fastcgi_module --without-http_uwsgi_module --without-http_scgi_module --without-http_grpc_module --without-http_memcached_module --without-http_limit_conn_module --without-http_limit_req_module --without-http_empty_gif_module --without-http_browser_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_least_conn_module --without-http_upstream_keepalive_module --without-http_upstream_zone_module --without-poll_module <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438 <i>proxy_pass<\/i> \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e <i>Nginx&#8217;\u043e\u043c<\/i> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <i>upstream<\/i>-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<pre><code class=\"bash\">$ diff \/scripts\/nginx\/nginx-1.19.2\/src\/http\/ngx_http_upstream_round_robin.c \/scripts\/nginx\/nginx-1.19.2.0\/src\/http\/ngx_http_upstream_round_robin.c 232a233 &gt;         ngx_log_stderr(0, &quot;%V\\n&quot;,&amp;peer[i].name); 238a240 &gt;     ngx_log_stderr(0, &quot;upstream \\&quot;%V\\&quot; in %s:%ui&quot;, &amp;us-&gt;host, us-&gt;file_name, us-&gt;line); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0435\u0449\u0451 \u0432\u0430\u0436\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u0441\u043e\u043b\u0432\u0438\u043d\u0433\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u043c\u0435\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\">$ cat \/etc\/resolv.conf nameserver 8.8.8.8 <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u043a\u0430\u043c\u0438, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">$ hostname example2.com $ nginx -t nginx: 93.184.216.34:80  nginx: [2606:2800:220:1:248:1893:25c8:1946]:80  nginx: upstream &quot;example&quot; in \/nginx\/vhosts\/example2.com:9 nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok nginx: configuration file \/etc\/nginx\/nginx.conf test is successful <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0441 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c <i>Nginx<\/i> \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0431\u044d\u043a\u0435\u043d\u0434-\u0441\u0435\u0440\u0432\u0435\u0440 <i>93.184.216.34:80<\/i> \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 <i>upstream<\/i>.<\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<pre><code class=\"bash\"> $ strace nginx -t 2&gt;&amp;1 | grep -vE &quot;(mmap|munmap|mprotect|poll|stat|ioctl|write|close|getsockname)&quot; | grep -vE &quot;^\\)&quot; | grep . | grep -FA 24 &quot;\/etc\/resolv.conf&quot; openat(AT_FDCWD, &quot;\/etc\/resolv.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;nameserver 8.8.8.8\\n&quot;, 4096)   = 19 read(5, &quot;&quot;, 4096)                       = 0 uname({sysname=&quot;Linux&quot;, nodename=&quot;example2.com&quot;, ...}) = 0 openat(AT_FDCWD, &quot;\/etc\/hosts&quot;, O_RDONLY|O_CLOEXEC) = 5 lseek(5, 0, SEEK_CUR)                   = 0 read(5, &quot;127.0.0.1\\tlocalhost\\n::1\\t\\tlocalho&quot;..., 4096) = 129 lseek(5, 0, SEEK_CUR)                   = 129 read(5, &quot;&quot;, 4096)                       = 0 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libnss_dns.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\300\\21\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libresolv.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\240C\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\20\\353\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\3com\\0\\0\\1\\0\\1&quot;, iov_len=29}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=29}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\330\\370\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\3com\\0\\0\\34\\0\\1&quot;, iov_len=29}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=29}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;\\20\\353\\201\\200\\0\\1\\0\\1\\0\\0\\0\\0\\7example\\3com\\0\\0\\1\\0\\1\\300\\f\\0&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 45 recvfrom(5, &quot;\\330\\370\\201\\200\\0\\1\\0\\1\\0\\0\\0\\0\\7example\\3com\\0\\0\\34\\0\\1\\300\\f\\0&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 57 openat(AT_FDCWD, &quot;\/etc\/gai.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;# Configuration for getaddrinfo(&quot;..., 4096) = 2584 read(5, &quot;&quot;, 4096)                       = 0 futex(0x7efdc41f2044, FUTEX_WAKE_PRIVATE, 2147483647) = 0 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(&quot;93.184.216.34&quot;)}, 16) = 0 <\/code><\/pre>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438:<br \/>  <a href=\"https:\/\/hsto.org\/webt\/fp\/fe\/jp\/fpfejpnv6i3kum27g4viqsa3d4m.png\" rel=\"nofollow\">hsto.org\/webt\/fp\/fe\/jp\/fpfejpnv6i3kum27g4viqsa3d4m.png<\/a><\/p>\n<p>  1) \u0418\u0437 <i>\/etc\/resolv.conf<\/i> \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435;<br \/>  2) \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <i>8.8.8.8<\/i>;<br \/>  3) \u0423\u0437\u043d\u0430\u0435\u043c <i>hostname<\/i> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 <i>example2.com<\/i>;<br \/>  4,5) \u041f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043e\u0442\u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442\u044c \u0438\u043c\u044f <i>example.com<\/i> \u043d\u0430 <i>8.8.8.8<\/i>;<br \/>  6) \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432 \u043e\u0442\u0432\u0435\u0442 <i>93.184.216.34<\/i> \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438 <i>example.com<\/i><\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0432 \u0448\u0430\u0433\u0435 3 \u0438 5 \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448 <i>hostname<\/i> \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f <i>example2.com<\/i> \u043f\u043e\u0447\u0435\u043c\u0443 <i>Nginx<\/i> \u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442 \u043d\u0435\u043a\u0438\u0439 <i>example.com<\/i>?<\/p>\n<p>  \u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0443\u0431\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0435\u0433\u043e <i>hostname<\/i>:<\/p>\n<pre><code class=\"bash\">$ hostname example2.wtf $ strace nginx -t 2&gt;&amp;1 | grep -vE &quot;(mmap|munmap|mprotect|poll|stat|ioctl|write|close|getsockname)&quot; | grep -vE &quot;^\\)&quot; | grep . | grep -FA 24 &quot;\/etc\/resolv.conf&quot; openat(AT_FDCWD, &quot;\/etc\/resolv.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;nameserver 8.8.8.8\\n&quot;, 4096)   = 19 read(5, &quot;&quot;, 4096)                       = 0 uname({sysname=&quot;Linux&quot;, nodename=&quot;example2.wtf&quot;, ...}) = 0 openat(AT_FDCWD, &quot;\/etc\/hosts&quot;, O_RDONLY|O_CLOEXEC) = 5 lseek(5, 0, SEEK_CUR)                   = 0 read(5, &quot;127.0.0.1\\tlocalhost\\n::1\\t\\tlocalho&quot;..., 4096) = 129 lseek(5, 0, SEEK_CUR)                   = 129 read(5, &quot;&quot;, 4096)                       = 0 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libnss_dns.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\300\\21\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libresolv.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\240C\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;F\\23\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\3wtf\\0\\0\\1\\0\\1&quot;, iov_len=29}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=29}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;{#\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\3wtf\\0\\0\\34\\0\\1&quot;, iov_len=29}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=29}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;F\\23\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\3wtf\\0\\0\\1\\0\\1\\300\\24\\0&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 111 recvfrom(5, &quot;{#\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\3wtf\\0\\0\\34\\0\\1\\300\\24\\0&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 111 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;V2\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\0\\0\\1\\0\\1&quot;, iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;3H\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\0\\0\\34\\0\\1&quot;, iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;V2\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\0\\0\\1\\0\\1\\0\\0\\6\\0\\1\\0\\1&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 100 recvfrom(5, &quot;3H\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\0\\0\\34\\0\\1\\0\\0\\6\\0\\1\\0\\1&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 100 brk(0x55ddf1d34000)                     = 0x55ddf1d34000 <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f <i>example.wtf<\/i>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430:<\/p>\n<pre><code class=\"bash\">$ hostname habr.ru $ nginx -t nginx: [emerg] host not found in upstream &quot;example&quot; in \/nginx\/vhosts\/example2.com:9 nginx: configuration file \/etc\/nginx\/nginx.conf test failed $ strace nginx -t 2&gt;&amp;1 | grep -vE &quot;(mmap|munmap|mprotect|poll|stat|ioctl|write|close|getsockname)&quot; | grep -vE &quot;^\\)&quot; | grep . | grep -FA 24 &quot;\/etc\/resolv.conf&quot; openat(AT_FDCWD, &quot;\/etc\/resolv.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;nameserver 8.8.8.8\\n&quot;, 4096)   = 19 read(5, &quot;&quot;, 4096)                       = 0 uname({sysname=&quot;Linux&quot;, nodename=&quot;habr.ru&quot;, ...}) = 0 openat(AT_FDCWD, &quot;\/etc\/hosts&quot;, O_RDONLY|O_CLOEXEC) = 5 lseek(5, 0, SEEK_CUR)                   = 0 read(5, &quot;127.0.0.1\\tlocalhost\\n::1\\t\\tlocalho&quot;..., 4096) = 129 lseek(5, 0, SEEK_CUR)                   = 129 read(5, &quot;&quot;, 4096)                       = 0 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libnss_dns.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\300\\21\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libresolv.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\240C\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\302\\300\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\2ru\\0\\0\\1\\0\\1&quot;, iov_len=28}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=28}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\345\\315\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\2ru\\0\\0\\34\\0\\1&quot;, iov_len=28}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=28}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;\\302\\300\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\2ru\\0\\0\\1\\0\\1\\300\\24\\0\\6&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 89 recvfrom(5, &quot;\\345\\315\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\2ru\\0\\0\\34\\0\\1\\300\\24\\0\\6&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 89 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;N6\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\0\\0\\1\\0\\1&quot;, iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\216P\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\0\\0\\34\\0\\1&quot;, iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;N6\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\0\\0\\1\\0\\1\\0\\0\\6\\0\\1\\0\\1&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 100 recvfrom(5, &quot;\\216P\\201\\203\\0\\1\\0\\0\\0\\1\\0\\0\\7example\\0\\0\\34\\0\\1\\0\\0\\6\\0\\1\\0\\1&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 100 brk(0x55d9815a6000)                     = 0x55d9815a6000 <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 <i>hostname<\/i> <i>habr.ru<\/i>, \u0430 <i>Nginx<\/i> \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0438\u043c\u044f <i>example.ru<\/i>.<\/p>\n<p>  \u041d\u0443 \u0438 \u043d\u0430 \u0437\u0430\u043a\u0443\u0441\u043a\u0443:<\/p>\n<pre><code class=\"bash\">$ hostname www.yandex.com $ nginx -t nginx: 213.180.204.242:80  nginx: [2a02:6b8::242]:80  nginx: upstream &quot;example&quot; in \/nginx\/vhosts\/example2.com:9 nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok nginx: configuration file \/etc\/nginx\/nginx.conf test is successful $ strace nginx -t 2&gt;&amp;1 | grep -vE &quot;(mmap|munmap|mprotect|poll|stat|ioctl|write|close|getsockname)&quot; | grep -vE &quot;^\\)&quot; | grep . | grep -FA 24 &quot;\/etc\/resolv.conf&quot; openat(AT_FDCWD, &quot;\/etc\/resolv.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;nameserver 8.8.8.8\\n&quot;, 4096)   = 19 read(5, &quot;&quot;, 4096)                       = 0 uname({sysname=&quot;Linux&quot;, nodename=&quot;www.yandex.com&quot;, ...}) = 0 openat(AT_FDCWD, &quot;\/etc\/hosts&quot;, O_RDONLY|O_CLOEXEC) = 5 lseek(5, 0, SEEK_CUR)                   = 0 read(5, &quot;127.0.0.1\\tlocalhost\\n::1\\t\\tlocalho&quot;..., 4096) = 129 lseek(5, 0, SEEK_CUR)                   = 129 read(5, &quot;&quot;, 4096)                       = 0 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 5 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libnss_dns.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\300\\21\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 openat(AT_FDCWD, &quot;\/lib\/x86_64-linux-gnu\/libresolv.so.2&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0&gt;\\0\\1\\0\\0\\0\\240C\\0\\0\\0\\0\\0\\0&quot;..., 832) = 832 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, 16) = 0 sendmmsg(5, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\305\\324\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\6yandex\\3com\\0&quot;..., iov_len=36}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=36}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=&quot;\\346\\345\\1\\0\\0\\1\\0\\0\\0\\0\\0\\0\\7example\\6yandex\\3com\\0&quot;..., iov_len=36}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=36}], 2, MSG_NOSIGNAL) = 2 recvfrom(5, &quot;\\305\\324\\201\\200\\0\\1\\0\\2\\0\\0\\0\\0\\7example\\6yandex\\3com\\0&quot;..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 79 recvfrom(5, &quot;\\346\\345\\201\\200\\0\\1\\0\\2\\0\\0\\0\\0\\7example\\6yandex\\3com\\0&quot;..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(&quot;8.8.8.8&quot;)}, [28-&gt;16]) = 91 openat(AT_FDCWD, &quot;\/etc\/gai.conf&quot;, O_RDONLY|O_CLOEXEC) = 5 read(5, &quot;# Configuration for getaddrinfo(&quot;..., 4096) = 2584 read(5, &quot;&quot;, 4096)                       = 0 futex(0x7f40c6c22044, FUTEX_WAKE_PRIVATE, 2147483647) = 0 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(&quot;213.180.204.242&quot;)}, 16) = 0 <\/code><\/pre>\n<p>  \u0421 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c <i>hostname<\/i> <i><a href=\"http:\/\/www.yandex.com\" rel=\"nofollow\">www.yandex.com<\/a><\/i> <i>Nginx<\/i> \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442, \u043d\u043e \u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f <i>example.yandex.com<\/i> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 <i>213.180.204.242<\/i>.<\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e: \u0435\u0441\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0430\u043c\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e (\u0438\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0441\u043e\u0432\u0441\u0435\u043c) <i>Nginx<\/i> \u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 <i>\/etc\/resolve.conf<\/i> (\u0443\u0447\u0442\u0435\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <i>nameserver<\/i>, \u043d\u043e \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>search<\/i>), \u0430 \u0441\u0430\u043c\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0442\u0451\u043c \u0437\u0430\u043c\u0435\u043d\u044b \u0447\u0430\u0441\u0442\u0438 \u0438\u043c\u0435\u043d\u0438 <i>hostname<\/i> (\u043d\u0438\u0437\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f) \u043d\u0430 \u0438\u043c\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 <i>proxy_pass<\/i>.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<br \/>  \u0415\u0441\u043b\u0438<br \/>  <i>hostname<\/i> \u0437\u0430\u0434\u0430\u043d \u043a\u0430\u043a <i>uno.duo.tres.yandex.ru<\/i>,<br \/>  <i>proxy_pass<\/i> \u043a\u0430\u043a <code>http:\/\/example<\/code>, <br \/>  \u0442\u043e \u0440\u0435\u0441\u043e\u043b\u0432\u0438\u0442\u044c <i>Nginx<\/i> \u0431\u0443\u0434\u0435\u0442 <i>example.duo.tres.yandex.ru<\/i><\/p>\n<p>  \u0422\u0443\u0442 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u044f\u0437\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u043d\u043e \u043a \u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u044d\u0442\u043e\u0442 \u0440\u0435\u0431\u0443\u0441, \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0438\u043b.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0438\u0431\u043e \u043a\u0440\u0438\u0432\u044b\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0435 \u0440\u0443\u043a\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u043e\u043b\u043e\u043c\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u043e\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043a\u0430\u043a <i>Nginx<\/i>.<\/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\/post\/516654\/\"> https:\/\/habr.com\/ru\/post\/516654\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516654\/\">\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440. \u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0436\u0438\u043b \u0441\u0430\u0439\u0442, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, <i>example.com<\/i>. <br \/>  \u0428\u043b\u043e \u0432\u0440\u0435\u043c\u044f, \u0441\u0430\u0439\u0442 \u0440\u043e\u0441, \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u043c\u0443 \u0441\u0442\u0430\u043b\u043e \u043c\u0430\u043b\u043e, \u0434\u0430 \u0435\u0449\u0451 \u0438 \u0440\u0435\u0431\u0440\u0435\u043d\u0434\u0438\u043d\u0433\u0430 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0418 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c, \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, <i>example2.com<\/i>.<\/p>\n<p>  \u0422\u0430\u043a \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 <i>Nginx<\/i> \u0441 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u043c <i>example2.com<\/i> \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c <i>example.com<\/i>, \u0438 \u0432 <i>\/etc\/hostname<\/i> \u043d\u0430 \u044d\u0442\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f <i>example.com<\/i> \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0435\u0436\u043d\u044f\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u0430\u044f \u0410-\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0414\u041d\u0421.<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, <i>uptime<\/i> \u0440\u043e\u0441, \u0430 \u0441\u0430\u0439\u0442 \u0432\u0441\u0451 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0440\u0435\u0431\u0440\u0435\u043d\u0434\u0438\u043d\u0433 \u0438 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u043d\u0430 <i>example2.wtf<\/i>. \u0413\u043e\u0442\u043e\u0432\u044f\u0441\u044c \u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u0448\u0435\u043b \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u043c\u0435\u043d\u0438\u043b \u0432 <i>\/etc\/hostname<\/i> \u0441\u0442\u0440\u043e\u043a\u0443 <i>example2.com<\/i> \u043d\u0430 <i>example2.wtf<\/i>, \u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430, \u0434\u0435\u043b\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0448\u043b\u043e \u0438 \u0437\u043e\u043d\u0443 \u0441\u0430\u0439\u0442\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0436\u043d\u0435\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u043d\u0444\u0438\u0433\u0438 <i>Nginx<\/i> \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c. \u041d\u043e \u0438 \u0432 <i>\/etc\/hostname<\/i> \u043f\u0440\u0435\u0436\u043d\u044e\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u0438. <\/p>\n<p>  \u041d\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0436\u0435 \u044d\u0442\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0431\u0438\u0442\u044c <i>Nginx<\/i>!<br \/>  \u0418\u043b\u0438 \u0432\u0441\u0451 \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u0435\u0442?  <\/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-309300","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309300","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=309300"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309300\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}