Ignore certain urls from logging in nginx -
im trying ignore urls on host (as requested sync clients , i'm not scared of of exposure/volunability here)
typical urls like;
/cloud/remote.php/caldav/calendars/xxxx@xxxx.com/personlig/ /cloud/remote.php/caldav/calendars/xxxx@xxxx.com/contact_birthdays/ /cloud/remote.php/carddav/xxxx@xxxx.com/
/cloud/remote.php/webdav/xxxx@xxxx.com/
what i'd idealy want achive ignore after /cloud/remote.php/ or /carddav/ or /caldav/ or /webdav/ s these belong sync clients , gets logged seperatedly
i've played around with
location = /cloud/remote.php/ { access_log off; } location = /caldav/calendars/ { access_log off; }
but didnt yield expected turn guys!
any suggestions on how can tackle this?
use regexps, not equal expression, e.g. /cloud/remote.php/*:
location ~ ^/cloud/remote.php/(caldav|webdav|carddav)(.*)$ { access_log off; }
as regexps priority, manual says: "the first matching expression stops search , nginx use location. if no regular expression matches request, nginx uses specific prefix location found earlier."
Comments
Post a Comment