Welcome! Log In Create A New Profile

Advanced

Re: Allow directive with variables

March 19, 2015 12:31AM
An easy way to solve this issue is to create a "allowmyip.conf" file and include it anywhere you wish.

allowmyip.conf file :

allow 11.22.33.44
deny all;


Then in your server block :location ^~ /apc/ {
# Allow home


include /etc/nginx/allowmyip.conf;
}


This way it will be real easy to manage if your IP address changes. Just update your IP Address in the allowmyip.conf file and restart the server.
Subject Author Posted

Allow directive with variables

Anonymous User December 31, 2012 07:51PM

Re: Allow directive with variables

Maxim Dounin January 01, 2013 04:32PM

Re: Allow directive with variables

Mayhem30 March 19, 2015 12:31AM



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: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready