Bug in Nginx rules
-
In:
valid_referers jetpack.wordpress.com/jetpack-comment/ *;
It should be:
valid_referers jetpack.wordpress.com/jetpack-comment/*;
That space before the asterisk results in an error. Removing the space fixes the issue.
root@MainServer:/etc/nginx/sites-available# nginx -t
nginx: [emerg] invalid hostname or wildcard “*” in /etc/nginx/security.rules:385
nginx: configuration file /etc/nginx/nginx.conf test failed
root@MainServer:/etc/nginx/sites-available# nano ../security.rules
root@MainServer:/etc/nginx/sites-available# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@MainServer:/etc/nginx/sites-available#Cheers
- The topic ‘Bug in Nginx rules’ is closed to new replies.