<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yeah. &nbsp;Currently doing it with a shell script, but was curious if there was a "righter" way. &nbsp;Thanks for the help.<div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#0011E0" face="Verdana"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Verdana; "><font class="Apple-style-span" color="#000000">Thanks,</font></span><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Verdana" size="3" style="font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000">Casey<br></font></font></div></span></font></div></div></span> </div><br><div><div>On Jan 30, 2008, at 6:52 PM, Eden Li wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">afaik, no. but you can easily hack ERB or some other templating system<br>into your deployment process.<br><br>ruby -rerb -e 'puts ERB.new(IO.read("nginx.rconf")).result' &gt; nginx.conf<br><br>then you could do stuff like:<br><br>&lt;% [10, 20, 99].each do |port| %&gt;<br> &nbsp;server {<br> &nbsp;&nbsp;&nbsp;listen &lt;%= port %&gt;;<br> &nbsp;&nbsp;&nbsp;...<br> &nbsp;}<br>&lt;% end %&gt;<br><br>mucho ugly, but it makes things shorter :)<br><br>On Jan 31, 2008 8:06 AM, Casey Rayman &lt;<a href="mailto:casey.rayman@d2sc.com">casey.rayman@d2sc.com</a>&gt; wrote:<br><blockquote type="cite">I'm using nginx as a reverse proxy and so I've got several sites which<br></blockquote><blockquote type="cite">use exactly the same config with the exception of the port. &nbsp;Is there<br></blockquote><blockquote type="cite">a way to do something like....<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">array {10,20,99}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">for each i in array {<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server {<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listen $i;<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Perhaps an odd question, but nginx has all kinds of useful features<br></blockquote><blockquote type="cite">I'd never thought of before.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Casey<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></blockquote></div><br></div></body></html>