<p dir="ltr">On 28 Apr 2014 12:44, "Joydeep Bakshi" <<a href="mailto:joydeep.bakshi@netzrezepte.de">joydeep.bakshi@netzrezepte.de</a>> wrote:<br>
> is<br>
><br>
> nginx [ server_name <a href="http://test1.com">test1.com</a> <a href="http://test2.com">test2.com</a> <a href="http://www.test3.com">www.test3.com</a> ] <br>
><br>
> equivalent to<br>
><br>
> apache [<br>
> servername <a href="http://test1.com">test1.com</a><br>
> serveralias <a href="http://test2.com">test2.com</a> <a href="http://www.test3.com">www.test3.com</a> ]<br>
><br>
> ? </p>
<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">foo.example.com</a> <a href="http://foo2.example.com">foo2.example.com</a> <a href="http://foo3.example.com">foo3.example.com</a>;<br>
2 -------------------<br>
server_name <a href="http://foo.example.com">foo.example.com</a><br>
<a href="http://foo2.example.com">foo2.example.com</a><br>
<a href="http://foo3.example.com">foo3.example.com</a>;<br>
3 -------------------<br>
server_name <a href="http://foo.example.com">foo.example.com</a>;<br>
server_name <a href="http://foo2.example.com">foo2.example.com</a>;<br>
server_name <a href="http://foo3.example.com">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">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>