Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

valid_referers dynamic hostname

$
0
0
Sorry for posting here - don't know for sure if it's the right place.

I have an issue:

1) I use nginx as reverse proxy, but I don't always know the domain name for which I'm serving, so my setup looks like this:

server_name _ $host 0.0.0.0;

2) I try to block invalid referers but when I try to add $host to valid_referers - it doesn't seem to work:

valid_referers none blocked server_names $host ~\.google\. ~\.yahoo\. ~\.bing\. ~\.ask\. ~\.live\. ~\.googleusercontent.com\. ;


How can I make this work?
Also please note that I don't know regexp.


Kind regards,
Vlad

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>