How to hide the server version?

Maxim Dounin mdounin at mdounin.ru
Tue Jul 8 00:30:15 MSD 2008


Hello!

On Mon, Jul 07, 2008 at 10:19:49PM +0200, Thomas wrote:

>Using the following directive:
>---
>  ## Deny certain Referers (case insensitive)
>  if $http_referer ~* (poker|sex|girl|grapx|allegro\.pl) {

- if $http_referer ~* (poker|sex|girl|grapx|allegro\.pl)
+ if ($http_referer ~* "(poker|sex|girl|grapx|allegro\.pl)")

>    return 444;
>  }
>---
>
>I get the following error message:
>---
>[emerg] 2854#0: invalid condition "$http_referer"
>
>
>The spelling is correct, what did I make wrong?
>

Maxim Dounin





More information about the nginx mailing list