The problem with VPS site is not loading after the server restarts?

On a VPS(ubuntu 16.04 server) the site is located. everything worked great had to change the passwords as root and another user replaced, everything continued to work had to reboot did reboot and the site is stopped the server is access server is nginx Tesin logs the last entry that is to overload the system in uwsgi logs record system startup without errors and the site is silent when typing in the browser shows can not find such a site is unavailable or blocked(hoster Hetzner) responds that everything is OK. the site is not blocked ip pinged routetrace shows the entire route and site not opening. Generally need help with restoration work or advice.
June 14th 19 at 20:31
1 answer
June 14th 19 at 20:33
Solution
nginx generally startown ? check if it's in the process.

ps-ef | grep nginx

If empty, start and add it to the startup.

PS As a start, I hope you know...
:) I'm certainly not a loser but not enough to immediately not watch my and no perezagruzite and the logs do not study:)
root@STP /var/log # ps-ef | grep nginx
root 1469 1 0 09:00 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 1470 1469 0 09:00 ? 00:00:00 nginx: worker process
www-data 1471 1469 0 09:00 ? 00:00:00 nginx: worker process
root 5367 4777 0 11:26 pts/2 00:00:00 grep --color=auto nginx
root@STP /var/log # Yes, there are processes and uwsgi running - gianni commented on June 14th 19 at 20:36
,
The port listen ? netstat-an | grep-i listen | egrep '(80/443)'.
If Yes, then try telnet <ip> <port></port></ip>from a remote machine.

And if you pull the curl of Ohm/Ohm wget'localhost your website?

And show the iptables rules (although it would seem, if only LSI restart)

sudo iptables -S - ezekiel.Johnston65 commented on June 14th 19 at 20:39
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 
tcp6 0 0 :::80 :::* LISTEN 
unix 2 [ ACC ] STREAM LISTENING 28092 /run/user/0/systemd/private
unix 2 [ ACC ] STREAM LISTENING 15080 /tmp/stp.sock


443 in nginx redirected

rules
sudo iptables -S
[sudo] password for alx:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
And we have someone pounding on ssh
last-f /var/log/btmp
this may affect the availability of the site? - gianni commented on June 14th 19 at 20:42
So, so. And you can read more on the topic of "443 in nginx redirected". You are on https or http ? If https on 443-rd port which does not listen, do not care for the rules of a redirect, the site will be unavailable. - ezekiel.Johnston65 commented on June 14th 19 at 20:45
telnet checked on two ports 80 443
[berluskuni@localhost ~]$ telnet * 80
80 prikonektilsya for 443 Connection refused - gianni commented on June 14th 19 at 20:48
Let me guess and in the browser you are using https, well, or do you have configured a redirect from 80 to 443-rd port. You have configured https on the website ? Show configs Nginx. - ezekiel.Johnston65 commented on June 14th 19 at 20:51
server {
 listen 80;
 listen [::]:80;
 server_name 88888.com;

 rewrite ^ <a href="https://888888.com$request_uri?">https://888888.com$request_uri?</a> permanent;
}
server {
 listen 443 ssl http2;
 listen [::]:443 ssl http2;
 ssl_certificate /etc/ssl/8888888.crt;
 ssl_certificate_key /etc/ssl/8888888.key;
 include /etc/nginx/snippets/ssl;
 server_name 88888888.com;

 if ($host !~* ^(88888888.com)$ ){return 444;}
 if ($request_method !~ ^(GET|HEAD|POST)$ ){return 444;}

 access_log /var/log/nginx/stp.access.log;
 error_log /var/log/nginx/stp.error.log;
 client_max_body_size 64m;
 location / {
 uwsgi_pass unix:///tmp/stp.sock;
 include uwsgi_params;
 uwsgi_param UWSGI_SCHEME $scheme;
 uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
 location /static/ {
 alias /home/alx/stp/static/;
}
 location /media/ {
 alias /home/alx/stp/static/media/;
}
}
server {
 listen 80;
 listen [::]:80;
 server_name www.88888888.com;

 rewrite ^ <a href="https://www.88888888.com$request_uri?">https://www.88888888.com$request_uri?</a> permanent;
}
server {
 listen 443 ssl http2;
 listen [::]:443 ssl http2;
 ssl_certificate /etc/ssl/8888888.crt;
 ssl_certificate_key /etc/ssl/8888888.key;
 include /etc/nginx/snippets/ssl;
 server_name www.888888888.com;

 access_log /var/log/nginx/stp.access.log;
 error_log /var/log/nginx/stp.error.log;
 client_max_body_size 64m;
 location / {
 uwsgi_pass unix:///tmp/stp.sock;
 include uwsgi_params;
 uwsgi_param UWSGI_SCHEME $scheme;
 uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
 location /static/ {
 alias /home/alx/stp/static/;
}
 location /media/ {
 alias /home/alx/stp/static/;
}
}

server {
 listen 80;
 listen [::]:80;
 server_name *.888888888.com;

 rewrite ^ <a href="https://*.888888888.com$request_uri?">https://*.888888888.com$request_uri?</a> permanent;
}
server {
 listen 443 ssl http2;
 listen [::]:443 ssl http2;
 ssl_certificate /etc/ssl/8888888888.crt;
 ssl_certificate_key /etc/ssl/88888888.key;
 include /etc/nginx/snippets/ssl;
 server_name *.8888888888.com;

 access_log /var/log/nginx/stp.access.log;
 error_log /var/log/nginx/stp.error.log;
 client_max_body_size 64m;
 location / {
 uwsgi_pass unix:///tmp/landing.sock;
 include uwsgi_params;
 uwsgi_param UWSGI_SCHEME $scheme;
 uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
 location /static/ {
 alias /home/alx/stp/static/;
}
 location /media/ {
 alias /home/alx/stp/static/;
}
}

Certificates purchased domain and podolny - gianni commented on June 14th 19 at 20:54
Yes, in the browser go to https - gianni commented on June 14th 19 at 20:57
Well the problem is clear, nginx raises 443-th port, that's why so immediately clear. Show error-log after the restart. If there's nothing there, then try to run nginx in debug

service nginx-debug start

If it is empty - I pass.: ( - ezekiel.Johnston65 commented on June 14th 19 at 21:00
A casket just opened pok some reason disappeared the configuration file nginx in this way:( - gianni commented on June 14th 19 at 21:03

Find more questions by tags DjangoUbuntu ServerNginx