A
A
antobra2017-06-21 10:04:56
linux
antobra, 2017-06-21 10:04:56

Prevent returning an error in Nginx?

There is a server with nginx on it. I have restricted IP access in nginx to this server. It is necessary for me that not only no one except me can log in, but that no one sees server errors (Neither 40X, nor 50X, etc.).
But the nginx settings are such that you have to return some kind of error code. For example 500 etc. And I would not want anyone other than me to even know that nginx is on the server. How to implement?
And if not nginx, then what? iptables?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
@
@ibKpoxa, 2017-10-31
_

Using nginx to hide the fact that it is not installed, use iptables.
Primitive option for port 80:
iptables -A INPUT -p tcp --dport 80 -s YOU_IP/MASK -j DROP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question