I always use "return 444" in the nginx configuration to stop scanners that access my servers directly through IP or through the wrong host name. It just closes the connection. Perfect.
Now I want to use this answer instead of the standard 404.html pages that nginx generates, but I cannot configure it.
error_page 500 502 503 504 /custom_50x.html;
This works fine, but I cannot βreturn 444β, as here:
server { listen 80; server_name ""; return 444; }
Does anyone know a way to combine these two?
Thanks in advance!
source share