Disable access by IP and unknown hosts

Nginx User nginx at nginxuser.net
Sat Oct 29 19:53:11 UTC 2011


On 29 October 2011 21:06, MyName <nginx-forum at nginx.us> wrote:
> i want to disable access from browser,
> ex = http://127.0.0.1/

To disable access by IP address, try setting your default server,
usually in nginx.conf, as follows:

    # Default server
    server {
        listen 80;
        listen 443;
	return 403;
    }



More information about the nginx mailing list