sudo lsof -i -P -n | grep LISTEN
systemd 1 root 35u IPv4 510425208 0t0 TCP *:111 (LISTEN)
sshd 376 root 3u IPv4 510424566 0t0 TCP *:22 (LISTEN)
sshd 376 root 4u IPv6 510424568 0t0 TCP *:22 (LISTEN)
postgres 400 postgres 3u IPv6 510428401 0t0 TCP [::1]:5432 (LISTEN)
postgres 400 postgres 4u IPv4 510428402 0t0 TCP 127.0.0.1:5432 (LISTEN)
ragent 422 usr1cv8 14u IPv6 510430433 0t0 TCP *:1540 (LISTEN)
ragent 422 usr1cv8 15u IPv4 510430434 0t0 TCP *:1540 (LISTEN)
rmngr 430 usr1cv8 11u IPv6 510429526 0t0 TCP *:1541 (LISTEN)
rmngr 430 usr1cv8 12u IPv4 510429527 0t0 TCP *:1541 (LISTEN)
rphost 525 usr1cv8 14u IPv6 510430433 0t0 TCP *:1540 (LISTEN)
rphost 525 usr1cv8 15u IPv4 510430434 0t0 TCP *:1540 (LISTEN)
rphost 525 usr1cv8 16u IPv6 510431458 0t0 TCP *:1560 (LISTEN)
rphost 525 usr1cv8 17u IPv4 510431459 0t0 TCP *:1560 (LISTEN)
telnet some.vps.myjino.ru 1540
Trying some.41.135...
telnet: Unable to connect to remote host: No route to host
server {
server_name some.ru www.some.ru;
location / {
proxy_pass http://127.0.0.1:1540;
}
}
server {
server_name some.ru www.some.ru;
root /var/www/buhgalter/mother-buh/;
#include sites-available/common.conf;
location /api {
proxy_pass http://localhost:3001/api;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Referer $http_host;
proxy_read_timeout 2000s;
proxy_send_timeout 2000s;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
}
}