B
B
bernex2015-01-21 11:18:49
Nginx
bernex, 2015-01-21 11:18:49

What is the sea of ​​domains in nginx and the 502 error?

Suddenly, a sea of ​​logs with different names appeared on the server: clients3.google.com-access.log, 1.gravatar.com-access.log, etc.
It's clear that the domain is not pinged to the server's ip... There are a
lot of repeated ip in the request, strange urls and referrers...
So just by starting nginx the server immediately hangs up, php-fpm does not pull.
I stop nginx and the load drops.
I didn't find any other code. Only one domain works on the server.
Where can this be and what to do?
Thank you!
UPD:
Helped get the site back up and running:

if ($host !~ ^(studio.com|www.studio.com)$ ) {
return 444;
}

But when nginx is raised, requests are poured into the logs all the same...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-01-21
@Nc_Soft

server {
  listen   80 default;
  access_log off;
  
  location / {
    return 444;
  }
}

this nonsense should be removed
if ($host !~ ^(studio.com|www.studio.com)$ ) {
return 444;
}
and make for each site its own section
server {
listen 80;
server_name site.ru;
}

X
xmoonlight, 2015-01-21
@xmoonlight

open proxy?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question