<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 3, 2011, at 13:35 , Александр Усов wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">С версии c 0.8.21 можно определить default_server(listen       80  <b>default_server</b>;), как сервth который будет использоваться, если нету совпадений по заголовку Host.<br><br>В вашем приме, можно сделать rewrite:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($host = ssl.localhost) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite ^(.*)$ <a href="https://localhost/">https://localhost</a>$1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></blockquote><div><br></div>Не надо проверять имя хоста в if. &nbsp;Не надо.</div><div>Для этого есть нормальные средства:<br><a href="http://nginx.org/en/docs/http/converting_rewrite_rules.html">http://nginx.org/en/docs/http/converting_rewrite_rules.html</a></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; 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: 0px; font-size: medium; "><div><br class="Apple-interchange-newline">--</div><div>Игорь Сысоев</div><div><a href="http://sysoev.ru">http://sysoev.ru</a></div></span>
</div>

<br></body></html>