Why NodeJS (request) can make a request to the local resource domain?

A server machine on Debian 8.6 x64.
Just yesterday put all set up, is ISPManager, Apache2(:8080) + Nginx (:80), NodeJS (v4.6.2, but tasted different, from 0.12 to 7.1).
For queries, use the package Request.

Request through the domain:
request('https://my-domain.ru/rest/request', callback());

Error:
[Error: getaddrinfo ENOTFOUND my-domain.ru my-domain.ru:443]
 code: 'ENOTFOUND',
 errno: 'ENOTFOUND',
 syscall: 'getaddrinfo',
 hostname: 'my-domain.ru',
 host: 'my-domain.ru',
 port: 443 }


The request is done via the IP:
request('http://175.90.1.55', callback());
In this case, the request passes.
The protocols do not pay attention, it is not critical.
The point is that IP opens 175.90.1.55 my-domain.ru although on the server a bunch of other resources.
If necessary I can attach the configs of Apache and Nginx.

The problem is solved, if in /etc/hosts to prescribe 175.90.1.55 my-domain.rubut this is not the correct solution, because on the server a bunch of other resources.

Nginx Configuration:
server {
 server_name my-domain.ru www.my-domain.ru;
 charset UTF-8;
 index index.html index.php;
 "disable_symlinks" if_not_owner from=$root_path;
 include /etc/nginx/vhosts-includes/*.conf;
 include /etc/nginx/vhosts-resources/my-domain.EN/*.conf;
 access_log /var/www/httpd-logs/my-domain.EN.access.log;
 error_log /var/www/httpd-logs/my-domain.EN.error.log notice;
 set $root_path /var/www/domain_user/data/www/my-domain.EN/public;
 root $root_path;
 location / {
 location ~ [^/]\.ph(p\d*|tml)$ {
 try_files /does_not_exists @fallback;
}
 location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
 try_files $uri $uri/ @fallback;
}
 location / {
 try_files /does_not_exists @fallback;
}
}
 location @fallback {
 proxy_pass http://127.0.0.1:8080;
 "proxy_redirect" http://127.0.0.1:8080 /;
 proxy_set_header Host $Host;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 access_log off;
}
 listen 175.90.1.55:80;
 return 301 https://$host:443$request_uri;
}
server {
 server_name my-domain.ru www.my-domain.ru;
 ssl on;
 ssl_certificate "/var/www/httpd-cert/domain_user/my-domain.EN.crtca";
 ssl_certificate_key "/var/www/httpd-cert/domain_user/my-domain.EN.key";
 ssl_ciphers directives EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
 ssl_prefer_server_ciphers on;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 add_header Strict-Transport-Security "max-age=31536000;";
 charset UTF-8;
 index index.html index.php;
 "disable_symlinks" if_not_owner from=$root_path;
 include /etc/nginx/vhosts-includes/*.conf;
 include /etc/nginx/vhosts-resources/my-domain.EN/*.conf;
 access_log /var/www/httpd-logs/my-domain.EN.access.log;
 error_log /var/www/httpd-logs/my-domain.EN.error.log notice;
 set $root_path /var/www/domain_user/data/www/my-domain.EN/public;
 root $root_path;
 location / {
 location ~ [^/]\.ph(p\d*|tml)$ {
 try_files /does_not_exists @fallback;
}
 location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
 try_files $uri $uri/ @fallback;
}
 location / {
 try_files /does_not_exists @fallback;
}
}
 location @fallback {
 proxy_pass http://127.0.0.1:8080;
 "proxy_redirect" http://127.0.0.1:8080 /;
 proxy_set_header Host $Host;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-<code>P</code>roto $scheme;
 access_log off;
}
 listen 175.90.1.55:443;
}


Apache Config:
<virtualhost 127.0.0.1:8080>
 ServerName my-domain.ru
 DocumentRoot /var/www/domain_user/data/www/my-domain.EN/public
 ServerAdmin webmaster@my-domain.ru
 AddDefaultCharset UTF-8
 AssignUserID domain_user domain_user
 CustomLog /var/www/httpd-logs/my-domain.EN.access.log combined
 ErrorLog /var/www/httpd-logs/my-domain.EN.error.log
 <filesmatch "\.ph(p[3-5]?|tml)$">
 SetHandler application/x-httpd-php
</filesmatch>
 <filesmatch "\.phps$">
 SetHandler application/x-httpd-php-source
</filesmatch>
 php_admin_value sendmail_path "/usr/sbin/sendmail -t-i-f webmaster@my-domain.ru"
 php_admin_value upload_tmp_dir "/var/www/domain_user/data/mod-tmp"
 php_admin_value session.save_path "/var/www/domain_user/data/mod-tmp"
 php_admin_value open_basedir "/var/www/domain_user/data:."
 ServerAlias www.my-domain.ru
 DirectoryIndex index.html index.php
</virtualhost>
<directory var www domain_user data my-domain.ru>
 Options-ExecCGI
 php_admin_flag engine on
</directory>
July 2nd 19 at 17:00
2 answers
July 2nd 19 at 17:02
Solution
The problem is solved, if in /etc/hosts to prescribe 175.90.1.55 my-domain.ru but this is not the correct solution, because on the server a bunch of other resources.

if I remember correctly how the domains in your network has DNS servers that have not yet received the record that on such and such IP is listed a certain set of letters.

Specify hosts manually forwarding. After a couple of days without check entries in hosts. If the problem persists, torture SIS. administrators and technical support of your provider on the subject of "where is my x-y.z IP nn.nn.nn.nn?"
A day or two need to the world got information that a domain exists.
I'll try to wait.
But yesterday, before reinstalling the system, the server function normally and even have been configured identically.
Thank you. - abagail_Daugherty commented on July 2nd 19 at 17:05
July 2nd 19 at 17:04
Solution
Tell me, and https://my-domain.ru/rest/request through the browser You get the desired result?

Don't want to offend anyone, with this set of tools You look knowledgeable person, but a virtual host my-domain.ru definitely configured correctly? ;-)
Via browser everything is fine.

Specifically, Noda does not want to see the focus of the resource domain. To clarify again - if in hosts to register clearly "175.90.1.55 my-domain.ru" that request goes and the problem sort of solved, but it is not a solution, given the fact that the car is not a single resource and multiple independent users under the ISP.
In the correct setup of host I'm sure only 95%, so you can write the configs of Apache and Nginx if needed. - abagail_Daugherty commented on July 2nd 19 at 17:07
: Let's see. - abagail_Daugherty commented on July 2nd 19 at 17:10
Updated the question, added the configs. - Buddy commented on July 2nd 19 at 17:13

Find more questions by tags DebianNode.js