Prohibit all IPs

Discussion in 'Installation/Configuration' started by Pyanepsion, Aug 19, 2019.

  1. Pyanepsion

    Pyanepsion Member

    Hello,
    I would like to ban any IP except mine which is e.g. 192.168.1.1.
    So I wrote the snippet directive.
    Code:
    # Test website
    location ^~ /restricted {
    allow 192.168.1.1; #Myself
    deny all;
    }
    When I do tests, it does not work anymore. What should be done ?
     

Share This Page