Welcome! Log In Create A New Profile

Advanced

Deny all location ... except

Rejaine Silveira Monteiro
October 21, 2020 02:52PM
Hi list..

I want to deny all access from external network to /prod and /hml
locations, except from some arguments like "?TEST" or "=TEST"

Examples:

https:/domain.com/prod/* (allow to localnet, deny to external users), but...
https:/domain.com/prod/INDEX.apw?op=01&SERVICE=TEST (allo to all)
https:/domain.com/prod/INDEX.apw?TEST=123 (allow to all)
https:/domain.com/prod/something/TEST/index.html (allow to all)

how to do this?
I tried to use something like " if ($args = TEST) { allow all;}",
but Nginx gives error " directive is not allowed here"

location /prod {
allow localnet;
deny all;
proxy_pass http://web1.domain:8080/prod;
}
location /hml {
allow localnet;
deny all
proxy_pass http://web1.domain:8081/hml;
}

I appreciate any help

--
*Esta mensagem pode conter informações confidenciais ou privilegiadas,
sendo seu sigilo protegido por lei. Se você não for o destinatário ou a
pessoa autorizada a receber esta mensagem, não pode usar, copiar ou
divulgar as informações nela contidas ou tomar qualquer ação baseada nessas
informações. Se você recebeu esta mensagem por engano, por favor avise
imediatamente ao remetente, respondendo o e-mail e em seguida apague-o.
Agradecemos sua cooperação.*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Deny all location ... except

Rejaine Silveira Monteiro October 21, 2020 02:52PM

Re: Deny all location ... except

Francis Daly October 26, 2020 09:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
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