Answer the question
In order to leave comments, you need to log in
Nginx suddenly started giving 404 pages to any requests. What could be?
At night, the site crashed for no apparent reason - it began to give a 404 page to all pages (I didn’t even give static).
Before that, masscan from the Beijing IP appeared in the logs (per day).
There is no crazy amount of requests in the logs, just before the crash.
After rebooting the server (made by the client, I didn’t have time to see the state of the system at that moment), everything fell into place.
The server is running 14.04.01
Linux TP 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
There are a lot of requests in the logs with 499 results, but not so many, to make it look like DDos.
configs:
Основной:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Подключаемый:
upstream django {
server unix:///home/user/djangoprojects/<...>;
}
server {
listen 80;
server_name <...>;
charset utf-8;
client_max_body_size 75M;
location /cmsmagazinee<...>.txt
{
alias /home/user/djangoprojects/<...>/static/cmsmagazinee<...>.txt;
}
location /media {
alias /home/user/djangoprojects/<...>/media;
}
location /static {
alias /home/user/djangoprojects/<...>/static;
}
location / {
uwsgi_pass django;
include /home/user/djangoprojects/<...>/uwsgi_params;
}
}
Answer the question
In order to leave comments, you need to log in
In such cases, you need to show the logs more so that you can be prompted.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question