nginx – allow only one IP to access the domain/subdomain

Restricting Access

Access can be allowed or denied by the IP address of a client or by using the HTTP basic authentication.To allow or deny access from a certain set of addresses, or all addresses, use the allow and deny directives:

location / {
    deny all;

Copy&Past from

Leave a Reply

Your email address will not be published. Required fields are marked *