Welcome! Log In Create A New Profile

Advanced

Converte Apache Restrictions to NGINX

Posted by lockyZ 
Converte Apache Restrictions to NGINX
November 29, 2016 12:09PM
We´re currently migrating Apache to NGINX and I need to allow only some address to my site. but I´m getting 503 error when I add deny all; in the end of my file, below is my Apache settings and my NGINX settings.

Apache configuration

<Location /my_addr>
Order Deny,Allow
Deny from all
Allow from 3.
Allow from 4.
Allow from 127.0.0.1
</Location>

NGINX configuration

location /my_addr {

allow 5.0.0.0/8;
allow 10.0.0.0/8;
allow 127.0.0.1;
deny all;

proxy_pass http://apibalancer;
}


Once I reload NGINX logs shows me 302 issue for any network even the ones that´s supposed to be allowed, any idea here?

Thanks in advance,



Edited 1 time(s). Last edit at 11/29/2016 12:11PM by lockyZ.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready