<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">The question is, how do I use the foreach construct in the nginx configuration file?</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div style="font-size:small">I am using openresty </div><div style="font-size:small">nginx -version<br>nginx version: openresty/<a href="http://1.21.4.1" target="_blank">1.21.4.1</a><br></div><div class="gmail_default" style="font-size:small">This fails:</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small"></span> foreach $domain in $server_name {<br>
</blockquote> ssl_certificate /etc/letsencrypt/live/$domain/fullchain.pem;<br> ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;<br> }</div>
</blockquote></div></div>
</blockquote></div></div>