preventing requests with unknown host names

Igal @ Lucee.org igal at lucee.org
Thu Aug 20 21:46:57 UTC 2015


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/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150820/a5a1b3ac/attachment.html>


More information about the nginx mailing list