Problem with NginxHttpRefererModule

Hi,

My server using nginx/0.8.49, and I try to using NginxHttpRefererModule.

This is my configuration :

location / {
    root   /var/www/iKocok/;
    index  index.html index.htm index.php;
    valid_referers server_names blocked none *.antituhan.com;
    if($invalid_referer) {
        return 404;
    }
}

But this error occur :

Starting nginx: [emerg]: unknown directive “if($invalid_referer)” in
/etc/nginx/sites-enabled/antituhan.com:11

How to fix this problem ?

Thanks in advance :slight_smile:

Hi,

Starting nginx: [emerg]: unknown directive “if($invalid_referer)” in
/etc/nginx/sites-enabled/antituhan.com:11

Add space between “if” and “(”.

Best regards,
Piotr S. < [email protected] >

Hi Piotr S.,

Simple problem :slight_smile:
Works like a charm, thanks for help :slight_smile:

View this message in context:
http://nginx.2469901.n2.nabble.com/Problem-with-NginxHttpRefererModule-tp5449838p5451592.html
Sent from the nginx mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs