S
S
Slash2022-01-05 17:19:50
Nginx
Slash, 2022-01-05 17:19:50

Two servers with the same server_name. This is fine?

Hello.
In one config (/etc/nginx/vhosts/www-root/site.com.conf) I have two server {} for the same domain as in the first one:

server {
  server_name site.com;
}

What's in the second:
server {
  server_name site.com;
}

The body of the server itself does not differ much, there are 5 different lines ... The config is managed using the ISP panel. I think why two servers for the same site, with a slight difference. Is this how it should be? Or should both servers be rewritten into one?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2022-01-05
@Slash-Zn

if on different ports, then the rules.
if on one it is stupid and why ??

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question