<br><br><div class="gmail_quote">2008/5/12 Igor Sysoev &lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, May 12, 2008 at 05:41:17PM +0400, Vladimir Rusinov wrote:<br>
<br>
&gt; В припадке перфекционизма взялся за оптимизацию конфига nginx.<br>
&gt;<br>
&gt; В контексте server есть такое место:<br>
&gt;<br>
&gt; error_page &nbsp; 403 /403.html;<br>
&gt; &gt; error_page &nbsp; 404 /404.html;<br>
&gt; &gt; error_page &nbsp; 500 /500.html;<br>
&gt; &gt; error_page &nbsp; 501 /501.html;<br>
&gt; &gt; error_page &nbsp; 502 /502.html;<br>
&gt; &gt; error_page &nbsp; 503 /503.html;<br>
&gt; &gt; error_page &nbsp; 504 /504.html;<br>
&gt; &gt; error_page &nbsp; 505 /505.html;<br>
&gt; &gt; location ~ /50.\.html {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; html/errors/;<br>
&gt; &gt; }<br>
&gt; &gt; location ~ /40.\.html {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; root html/errors/;<br>
&gt; &gt; }<br>
&gt; &gt; location /error_img/ {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; root html/errors/;<br>
&gt; &gt; }<br>
&gt;<br>
&gt;<br>
&gt; Как-то оно совсем не красиво выглядит, к тому же хотелось бы совсем<br>
&gt; избавиться от регулярок.<br>
&gt; Что-то не могу придумать более красивое решение.<br>
<br>
</div> &nbsp; &nbsp;error_page &nbsp;403 &nbsp;/errors/403.html;<br>
 &nbsp; &nbsp;...<br>
<br>
 &nbsp; &nbsp;location /errors/ {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; root html;<br>
<div class="Ih2E3d"> &nbsp; &nbsp;}</div></blockquote><div><br>Точно, спасибо.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
&gt; &gt; location /forum {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; rewrite ^.*$ &nbsp; &nbsp;/forum/ permanent;<br>
&gt; &gt; }<br>
&gt;<br>
&gt; location /forum/ {<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass &nbsp; &nbsp; &nbsp;<a href="http://127.0.0.2:5080/" target="_blank">http://127.0.0.2:5080/</a>;<br>
&gt; &gt; }<br>
&gt;<br>
&gt;<br>
&gt; Этот кусок был сделан в спешке. Как тут поступить правильно?<br>
<br>
</div>Достаточно только<br>
<div class="Ih2E3d"><br>
 &nbsp; &nbsp;location /forum/ {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass &nbsp; &nbsp; &nbsp;<a href="http://127.0.0.2:5080/" target="_blank">http://127.0.0.2:5080/</a>;<br>
 &nbsp; &nbsp;}<br>
<br>
</div>nginx сам будет автомагически возвращать редирект для /forum.</blockquote><div><br>Когда был только /forum/ оно почему-то не работало. Сейчас стоит 0.5.32, на выходных обновлю до 0.6 - может заработает, а может дело где-то в конфиге который наспех писался.<br>
</div></div><br>-- <br>Vladimir Rusinov<br>Voronezh, Russia<br>UNIX Admin @ Murano Software