Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

preventing requests with unknown host names (8 replies)

$
0
0
I want to disable processing of all requests that do not have a valid
hostname

I'm tried to follow the advice on:
http://nginx.org/en/docs/http/request_processing.html#how_to_prevent_undefined_server_names

so I have (inside http directive):

server {

listen 80;
server_name "";
return 444;
}

I also tried

server {

listen 80;
server_name _;
return 444;
}

but I am still able to access the website by its IP address?

what am I doing wrong?

--

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>