Welcome! Log In Create A New Profile

Advanced

Deny access to Drupal admin execpt for declared IP range

Posted by velvetpixel 
Deny access to Drupal admin execpt for declared IP range
August 21, 2013 11:57AM
I am trying to deny access to drupal admin except for a /24 and I can't get it to work.

I am using this code:

location /admin/* {
allow 10.102.130.0/24;
deny all;
}

Is my syntax incorrect?
Does it need to be in a different location in the file? It is currently right after my server_name and root declarations.
Re: Deny access to Drupal admin execpt for declared IP range
August 21, 2013 12:12PM
The error in logs I am seeing is:


2013/08/21 16:07:14 [error] 1001#0: *1 open() "/home/example/public_html/admin" failed (2: No such file or directory), client: 10.102.130.237, server: dev.example.com, request: "GET /admin HTTP/1.1", host: "dev.example.com"

Is this because /home/example/public_html/admin is not a real directory in the filesystem but an alias that drupal uses internally?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready