<div dir="ltr">Thanks to both of you</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 6:46 PM, Jonathan Matthews <span dir="ltr"><<a href="mailto:contact@jpluscplusm.com" target="_blank">contact@jpluscplusm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><p dir="ltr">On 28 Apr 2014 12:44, "Joydeep Bakshi" <<a href="mailto:joydeep.bakshi@netzrezepte.de" target="_blank">joydeep.bakshi@netzrezepte.de</a>> wrote:<br>
> is<br>
><br>
> nginx [ server_name <a href="http://test1.com" target="_blank">test1.com</a> <a href="http://test2.com" target="_blank">test2.com</a> <a href="http://www.test3.com" target="_blank">www.test3.com</a> ] <br>
><br>
> equivalent to<br>
><br>
> apache [<br>
> servername <a href="http://test1.com" target="_blank">test1.com</a><br>
> serveralias <a href="http://test2.com" target="_blank">test2.com</a> <a href="http://www.test3.com" target="_blank">www.test3.com</a> ]<br>
><br>
> ? </p>
</div><p dir="ltr">As Maxim says, yes.</p>
<p dir="ltr">If you have hardcoded names, i believe there are 3 ways to format it:</p>
<p dir="ltr">1 -------------------<br>
server_name <a href="http://foo.example.com" target="_blank">foo.example.com</a> <a href="http://foo2.example.com" target="_blank">foo2.example.com</a> <a href="http://foo3.example.com" target="_blank">foo3.example.com</a>;<br>
2 -------------------<br>
server_name <a href="http://foo.example.com" target="_blank">foo.example.com</a><br>
<a href="http://foo2.example.com" target="_blank">foo2.example.com</a><br>
<a href="http://foo3.example.com" target="_blank">foo3.example.com</a>;<br>
3 -------------------<br>
server_name <a href="http://foo.example.com" target="_blank">foo.example.com</a>;<br>
server_name <a href="http://foo2.example.com" target="_blank">foo2.example.com</a>;<br>
server_name <a href="http://foo3.example.com" target="_blank">foo3.example.com</a>;<br>
---------------------</p>
<p dir="ltr">Note the different semicolon placement in each. They are, I believe, functionally and performance-ly identical.</p>
<p dir="ltr">They each have their different uses depending on how you amend, interrogate and share your configurations. E.g. #3 is handy when you'll be grepping for the fixed string "server_name <a href="http://foo2.example.com" target="_blank">foo2.example.com</a>".</p>
<p dir="ltr">Consistency is probably most important, however: choose one style and stick to it :-)</p>
<p dir="ltr">HTH, <br>
J</p>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>