Welcome! Log In Create A New Profile

Advanced

Re: Nginx with php configuration how to block all requests/urls other than two?

January 29, 2015 12:29PM
In the map flip the 1 and 0 around, if $allowonly=1 then the IF is true (unless that's what you want).

General rule for IF's; only use it to return a state.

if ..... return ....
continue with complex configuration items.

Don't do: 'if ..... do complex things ....' (unless proceeded with Lua finishing with an nginx if....return)

If you want to expand the logic what is ok and what not, have a look at my conf\nginx-simple-WAF.conf
where 3 maps are combined into 1 result map.

In your case you could use 2 mappings, 1 for normal requests and 1 for passed-on php requests.

---
nginx for Windows http://nginx-win.ecsds.eu/
Subject Author Posted

Nginx with php configuration how to block all requests/urls other than two?

c0nw0nk January 29, 2015 09:20AM

Re: Nginx with php configuration how to block all requests/urls other than two?

itpp2012 January 29, 2015 10:09AM

Re: Nginx with php configuration how to block all requests/urls other than two?

c0nw0nk January 29, 2015 10:55AM

Re: Nginx with php configuration how to block all requests/urls other than two?

itpp2012 January 29, 2015 12:29PM

Re: Nginx with php configuration how to block all requests/urls other than two?

B.R. January 29, 2015 12:58PM

Re: Nginx with php configuration how to block all requests/urls other than two?

Francis Daly January 29, 2015 01:48PM

Re: Nginx with php configuration how to block all requests/urls other than two?

c0nw0nk January 30, 2015 02:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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