I use a map in nginx to block bad user agents (nutch and such). Some RSS readers have funny user agents, so I rather not run the map on that directory.

Stripping down the nginx.conf file:

location / {
 root   /usr/share/nginx/html/mydomain/public_html;
        if ($badagent)     { return 403; }
location = /feeds {
        try_files $uri $uri.xml $uri/ ;

The "=" should force an exact match, but the badagent map is checked.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.