Answer the question
In order to leave comments, you need to log in
How to reset the connection when connected by IP?
There is an A-record in DNS (A test.ru 1.2.3.4). Of course, the IP of the server is scorched there. I would like to turn a thing around:
If the client connects via a domain (test.ru), then some content is displayed, but if he tries to connect via IP (1.2.3.4) - reset the connection. Maybe it can be done via nginx with some error code? It is desirable, of course, to actually reset the connection.
Answer the question
In order to leave comments, you need to log in
You can make a separate server block that will handle connections by IP address, not by domain. It is configured in the same way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question