<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I am new to the use of maps, but I suppose it would fit perfectly, using core variables such as the binary IP address:<br>Maybe something like:<br>
<br>server {<br> error_page 503 /503.html # Configuring error page<br><br> map $binary_remote_addr $target { # Configuring white-listed IP addresses<br> default KO<br>
your_whitelisted_binary_IP_address_value OK<br> }<br><br> rewrite ^.*$ $target #Redirecting all traffic according to map-assigned value<br><br> location @OK { # Named location to do nothing, i.e. serve content as usual<br>
}<br><br> location @KO { # Named location to trap maintenance traffic, spawning a HTTP 503 error<br> return 503;<br> }<br>}<br><br>Untested, thus unsure, but I'd seek something looking like this.<br>
</div>
<div class="gmail_extra"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font>
</div></div>