I am trying to add the ads.txt to my website and trying to implement it with the command below however ->
location = /ads.txt {
allow all;
log_not_found off;
access_log off;
}
I am getting this error:
Location command not found
allow command not found
Anybody experience this?
2 Replies
I don't use nginx but I'm pretty sure that the '=' is your problem. Change your config to:
location /ads.txt {
allow all;
log_not_found off;
access_log off;
}
See: https://bitlaunch.io/blog/how-to-configure-nginx/
While this syntax may (?) be correct, my advice does not guarantee that your site will suddenly start working.
-- sw
Hello, thank you for your suggestion. I tried it but it still provided the same outcome.