<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">Hello.</span><div class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">I am compiling Nginx 1.14.0 from source on Ubuntu 18.04 LTS with a view to compiling ipscrub as a dynamic module. </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">My compile completes without error, my nginx.conf validates, Nginx runs as expected, yet my server block throws an error about an unknown log format. </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">If my `log_format` directive appears after the `access_log` directive in nginx.conf, it will not validate, stating: </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class=""> nginx: [emerg] unknown log format "ipscrubbed" in /etc/nginx/nginx.conf:15 </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">If my `log_format` directive appears before the `access_log` directive in nginx.conf, it validates. </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">If my `log_format` directive appears before the `access_log` directive in nginx.conf, the default server block will not validate, stating: </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class=""> nginx: [emerg] unknown log format "ipscrubbed" in /etc/nginx/sites-enabled/default:2 </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">…implying that although my custom `log_format` is valid, the default server block is not inheriting it. Which has completely thrown me. Do I need to reposition the `access_log` directive to a later point in the server block? Or is there something else fundamental that I'm overlooking? </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">I would very much appreciate an additional pair of eyes on this, if your interest, time and attention permits. </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">Thank you in advance. </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">My compile script: <a href="https://gist.github.com/petecooper/95b532b343372f707876161ee338b870" class="">https://gist.github.com/petecooper/95b532b343372f707876161ee338b870</a> </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">My nginx.conf: <a href="https://gist.github.com/petecooper/29fcf66f1fad0279b157201c8f233c59" class="">https://gist.github.com/petecooper/29fcf66f1fad0279b157201c8f233c59</a> </span><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><br style="clear: both; font-family: Arial; background-color: rgb(255, 255, 255);" class=""><span style="font-family: Arial; font-size: medium; background-color: rgb(255, 255, 255);" class="">My server block: <a href="https://gist.github.com/petecooper/b3fa68a165afd03fdaca3ba32545f49e" class="">https://gist.github.com/petecooper/b3fa68a165afd03fdaca3ba32545f49e</a></span><br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">-- </span><br style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Pete Cooper</span><br style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:pete@pragmatika.net" class="">pete@pragmatika.net</a></span><br style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="https://pragmatika.net" class="">https://pragmatika.net</a></span>
</div>
<br class=""></div></body></html>