<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-2927573342244378548</atom:id><lastBuildDate>Thu, 26 Aug 2010 08:02:29 +0000</lastBuildDate><title>Мастерю на коленке</title><description>Говорят, что в Парижской Палате Мер и Весов где-то есть Идеальный Провайдер. Он дает канал на 1Gbps на 1 год за 1 рубль. Он хранится под стеклом и его нельзя трогать руками.</description><link>http://webblog.pilin.name/</link><managingEditor>noreply@blogger.com (ww898)</managingEditor><generator>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2927573342244378548.post-7185635810795246894</guid><pubDate>Sat, 06 Feb 2010 10:30:00 +0000</pubDate><atom:updated>2010-02-06T04:26:10.264-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>OpenVZ</category><category domain='http://www.blogger.com/atom/ns#'>ferm</category><category domain='http://www.blogger.com/atom/ns#'>Debian</category><title>Устанавливаем OpenVZ на Debian 5 lennty (часть №2)</title><description>&lt;p&gt;Теперь можно создать виртуальные машины - все вроде просто, но есть 2 важных вопроса: доступ виртуальной машины в сеть и &lt;span style="font-style:italic;"&gt;nameserver&lt;/span&gt; для вашей виртуальной машины.&lt;/p&gt;
&lt;p&gt;Для решения первого вопроса я использую &lt;span style="font-style:italic;"&gt;ferm&lt;/span&gt; - замечательная надстройка над &lt;span style="font-style:italic;"&gt;iptables&lt;/span&gt;, для установки необходимо выполнить следующую команду, а так же ответить положительно на вопрос о включении блокировки всего за исключением &lt;span style="font-style:italic;"&gt;ssh&lt;/span&gt;.&lt;/p&gt;
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-get&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;install&lt;/span&gt; ferm&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Собственно теперь самая ответственная и важная часть - это написание правил для ferm. Сначала нужно определиться с поставленной задачей чего мы хотим от виртуального компьютера: а мы хотим на 92.168.11.107 видеть &lt;span style="font-style:italic;"&gt;http&lt;/span&gt; и &lt;span style="font-style:italic;"&gt;ssh&lt;/span&gt; сервер, реальный компьютер будет содержать собственный nameserver, а все виртуальные будут его использовать для получения &lt;span style="font-style:italic;"&gt;ip&lt;/span&gt; адреса по &lt;span style="font-style:italic;"&gt;DNS&lt;/span&gt; имени сервера (к этому мы вернемся гораздо позднее). Вот пример такой конфигурации:&lt;/p&gt;
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;def $INTRUDER = 192.168.11.107;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;table filter &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; chain INPUT &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; policy DROP;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # connection tracking&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mod state state INVALID DROP;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mod state state &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;ESTABLISHED RELATED&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # allow local packages&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface lo ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # allow SSH connections&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proto tcp dport ssh ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ### access from virtual computer to local nameserver&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface venet0 proto &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;tcp udp&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; dport &lt;span style=""&gt;53&lt;/span&gt; ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; chain OUTPUT &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; policy ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # connection tracking&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #mod state state INVALID DROP;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mod state state &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;ESTABLISHED RELATED&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; chain FORWARD &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; policy DROP;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # connection tracking&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mod state state INVALID DROP;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mod state state &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;ESTABLISHED RELATED&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ### access from virtual computer to internet&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface venet0 outerface eth0 ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ### access from internet to specific virtual ports&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outerface venet0 daddr $INTRUDER proto tcp dport &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;ssh http&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; ACCEPT;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Перезапускаем ferm:&lt;/p&gt;
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;etc&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;init.d&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;ferm restart&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Не забываем добавить строчку в &lt;span style="font-style:italic;"&gt;/etc/sysctl.conf&lt;/span&gt;:&lt;/p&gt;
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;net.ipv4.ip_forward=&lt;span style=""&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;И запускаем команду:&lt;/p&gt;
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;sysctl &lt;span style="color: #660033;"&gt;-p&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;Создаем собственно виртуальную машину (обратите внимание, что в качестве &lt;span style="font-style:italic;"&gt;nameserver&lt;/span&gt; мы временно используем 192.168.11.1, в принципе подойдет любой &lt;span style="font-style:italic;"&gt;nameserver&lt;/span&gt; в том числе и 8.8.8.8 от &lt;span style="font-style:italic;"&gt;Google&lt;/span&gt;), запускаем и наконец заходим на нее под правами администратора:&lt;/p&gt;
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl create &lt;span style=""&gt;101&lt;/span&gt; --ostemplate debian-&lt;span style=""&gt;5.0&lt;/span&gt;-i386-minimal&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl set &lt;span style=""&gt;101&lt;/span&gt; --onboot yes --save&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl set &lt;span style=""&gt;101&lt;/span&gt; --hostname intruder --save&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl set &lt;span style=""&gt;101&lt;/span&gt; --nameserver 192.168.11.1 --save&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl set &lt;span style=""&gt;101&lt;/span&gt; --ipadd 192.168.11.101 --save&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl start &lt;span style=""&gt;101&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;vzctl enter &lt;span style=""&gt;101&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;su -&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;На этом этапе наш виртуальный компьютер должен без нареканий выполнять команду:&lt;/p&gt;
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;arp yandex.ru&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2927573342244378548-7185635810795246894?l=webblog.pilin.name' alt='' /&gt;&lt;/div&gt;</description><link>http://webblog.pilin.name/2010/02/openvz-debian-5-lennty-2.html</link><author>noreply@blogger.com (ww898)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2927573342244378548.post-2900500614301165933</guid><pubDate>Tue, 27 Oct 2009 05:37:00 +0000</pubDate><atom:updated>2009-10-26T23:22:00.766-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>OpenVZ</category><category domain='http://www.blogger.com/atom/ns#'>Debian</category><title>Устанавливаем OpenVZ на Debian 5 lennty (часть №1)</title><description>&lt;p&gt;Раскрыл для себя очень полезное свойство системы виртуализации - при смене dedicated хостинга достаточно перенести виртуальную машину с сайтом в другое место, капельку похимичить и все опять побежало. Никаких тебе кропотливых настроек и длительных инсталляций, да и backup делать просто. Еще одним полезным свойством является то, что даже если злоумышленник вскроет сайт, то попортить он может только виртуальную машину, которая быстро восстанавливается из backup. Надеюсь я всех убедил?&lt;/p&gt;
&lt;p&gt;Сперва ставим новое ядро с поддержкой &lt;a href="http://wiki.openvz.org/"&gt;OpenVZ&lt;/a&gt; (внимание для другой платформы, такой как x64, имя может быть другое):
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-get&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;install&lt;/span&gt; linux-image-&lt;span style="color: #000000;"&gt;2.6&lt;/span&gt;-openvz-&lt;span style="color: #000000;"&gt;686&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Перегружаемся и проверяем что все в порядке - ядро поменялось:
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;uname&lt;/span&gt; &lt;span style="color: #660033;"&gt;-a&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Далее, если нужно поднимаем &lt;a href="http://webblog.pilin.name/2009/10/ipset-debian-5-lenny.html"&gt;поддержку ipset&lt;/a&gt;. Теперь необходимо настроить &lt;span style="font-style:italic;"&gt;apt&lt;/span&gt; для доступа в OpenVZ репозиторий. Добавляем следующую строчку в &lt;span style="font-style:italic;"&gt;/etc/apt/sources.list&lt;/span&gt;:
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;deb http://download.openvz.org/debian-systs etch openvz&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Создаем или правим &lt;span style="font-style:italic;"&gt;/etc/apt/preferences&lt;/span&gt;:
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Package: *&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Pin: release a=lenny&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Pin-Priority: &lt;span style=""&gt;700&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Package: *&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Pin: release a=etch&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;Pin-Priority: &lt;span style=""&gt;650&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
Создаем или правим &lt;span style="font-style:italic;"&gt;/etc/apt/apt.conf&lt;/span&gt;:
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;APT::Default-Release &amp;quot;stable&amp;quot;;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Загружаем ключи для доступа в репозиторий:
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;wget&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; http:&lt;span style="color: #000000; font-weight: bold;"&gt;//&lt;/span&gt;download.openvz.org&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;debian-systs&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;dso_archiv_signing_key.asc &lt;span style="color: #660033;"&gt;-O-&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;|&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-key&lt;/span&gt; add - &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-get&lt;/span&gt; update&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Устанавливаем OS tempaltes - болванки нужных нам виртуальных машин:
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-get&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;install&lt;/span&gt; vzctl-ostmpl-debian-&lt;span style="color: #000000;"&gt;5.0&lt;/span&gt;-i386-minimal&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Нам осталось сделать две вещи: настроить сеть для виртуальной машины и создать собственно саму виртуальную машину (или машины), но об это м в следующей серии...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2927573342244378548-2900500614301165933?l=webblog.pilin.name' alt='' /&gt;&lt;/div&gt;</description><link>http://webblog.pilin.name/2009/10/openvz-debian-5-lennty-1.html</link><author>noreply@blogger.com (ww898)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2927573342244378548.post-6880716849920437578</guid><pubDate>Sun, 25 Oct 2009 06:54:00 +0000</pubDate><atom:updated>2009-10-26T23:05:57.349-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ipset</category><category domain='http://www.blogger.com/atom/ns#'>Debian</category><title>Включаем ipset в Debian 5 lenny</title><description>&lt;p&gt;В Debian 5 Lenny ipset присутствует, но по умолчанию не установлен. Для его загрузки и активации необходимо выполнить следующее:
&lt;div class="bash" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;apt-get&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;install&lt;/span&gt; netfilter-extensions-source ipset&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;m-a a-i netfilter-extension&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
Рекомендуется так же добавить ключик &lt;span style="font-style:italic;"&gt;-t&lt;/span&gt; после &lt;span style="font-style:italic;"&gt;&lt;a href="http://web.iesrodeira.com/cgi-bin/man/man2html?m-a"&gt;m-a&lt;/a&gt;&lt;/span&gt; для вывода результатов на консоль без графического интерфейса.
&lt;/p&gt;
&lt;p&gt;P.S. При смене ядра (например установка OpenVZ) последнюю строчку необходимо исполнить еще раз (sources ядра выкачиваются автоматически).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2927573342244378548-6880716849920437578?l=webblog.pilin.name' alt='' /&gt;&lt;/div&gt;</description><link>http://webblog.pilin.name/2009/10/ipset-debian-5-lenny.html</link><author>noreply@blogger.com (ww898)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2927573342244378548.post-3854428298574642216</guid><pubDate>Thu, 22 Oct 2009 20:30:00 +0000</pubDate><atom:updated>2009-10-22T13:45:19.603-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>PHP</category><category domain='http://www.blogger.com/atom/ns#'>SMF</category><title>Отключаем PHPSESSID в SMF для гостей</title><description>&lt;p&gt;Делается для того чтобы улучшить индексирование поисковыми машинами. Версия форума &lt;a href="http://simplemachines.org/"&gt;SMF&lt;/a&gt; 1.1.10 в своих потрохах (&lt;span style="font-style:italic;"&gt;Sources/Loads.php&lt;/span&gt;) уже имеет следующую установку:
&lt;div class="php" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #339933;"&gt;@&lt;/span&gt;&lt;a style="color: #000060;" href="http://www.php.net/ini_set"&gt;&lt;span style="color: #990000;"&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'session.use_trans_sid'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; 0&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
Другими словами половина дела уже сделана за нас. Вторую половину можно сделать разными способами:
&lt;p&gt;Прямо в PHP скрипте:
&lt;div class="php" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span style="color: #339933;"&gt;@&lt;/span&gt;&lt;a style="color: #000060;" href="http://www.php.net/ini_set"&gt;&lt;span style="color: #990000;"&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'session.use_only_cookies'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; 1&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;&lt;p&gt;Или в &lt;span style="font-style:italic;"&gt;php.ini&lt;/span&gt;:
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;session.use_only_cookies=&lt;span style=""&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2927573342244378548-3854428298574642216?l=webblog.pilin.name' alt='' /&gt;&lt;/div&gt;</description><link>http://webblog.pilin.name/2009/10/phpsessid-smf.html</link><author>noreply@blogger.com (ww898)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2927573342244378548.post-6072762641777027625</guid><pubDate>Fri, 16 Oct 2009 06:52:00 +0000</pubDate><atom:updated>2009-10-25T00:10:57.898-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SMF</category><category domain='http://www.blogger.com/atom/ns#'>nginx</category><category domain='http://www.blogger.com/atom/ns#'>Debian</category><title>Конфигурируем NGINX и SMF под Debian 5 для отражения не сильных DDoS атак</title><description>&lt;p&gt;Все нижесказанное имеет отношение к &lt;a href="http://sysoev.ru/nginx"&gt;NGINX&lt;/a&gt; 0.7.62 и &lt;a href="http://simplemachines.org/"&gt;SMF&lt;/a&gt; 1.1.10. На момент написания этого топика &lt;span style="font-style:italic;"&gt;apt-get install nginx&lt;/span&gt; инсталлирует старую версию 0.6, а нам нужно более новая и стабильная 0.7.62. Поэтому скачиваем sources компилируем и устанавливаем.&lt;/p&gt;
&lt;p&gt;Наша цель: на гостей форума не тратить процессорное время - не трогать SMF по возможности и все готовые страницы хранить в cache, а пользователям наоборот позволять видеть самые последние изменения на форуме без задержек.&lt;/p&gt;
&lt;p&gt;Вопрос первый: Как отличить пользователя от гостя? После установки SMF форума в окне настроек сервера есть поле "Имя Cookie". Наличие cookie с таким именем говорит о том, что перед нами пользователь, а отсутствие - гость. Обратите внимание на то, что количество использований перед тем как страница попадает в cache выставлена в 2 - это предотвращает кеширование ненужных страниц.&lt;/p&gt;
&lt;p&gt;Вопрос второй? Стоит ли использовать GZIP сжатие в SMF или нет? Стоит! Хотя на это и тратиться процессорное время в PHP, но включать сжатие в NGINX точно не стоит - процессорное время будет тратиться на каждый запрос хотя и в меньшем количестве, но запросов-то многие тыщи!&lt;/p&gt;
&lt;p&gt;Теперь еще один важный вопрос: загруженные пользователями аватары и картинки в SMF он загружаются через PHP, что существенно просаживает сервер. Они одинаковы для пользователей и гостей. И меняются ну очень очень редко. Наша задача их положить в cache и потом брать их только оттуда.&lt;/p&gt;
&lt;p&gt;В этой статье не отражена тема реакции на 503 ошибку выдаваемую NGINX при исчерпании лимитов,а так же вопросы блокирования ботов со скоростью долбежки 1 раз в несколько секунд запрашивающих каждый раз произвольную страницу.&lt;/p&gt;
&lt;p&gt;/etc/nginx/nginx.conf
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;user www-data www-data;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;worker_processes &lt;span style=""&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;worker_rlimit_nofile &lt;span style=""&gt;80000&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;#error_log /var/log/nginx/error.log;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;pid /var/run/nginx.pid;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;events &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; use epoll;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; worker_connections &lt;span style=""&gt;50000&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;http &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; include /etc/nginx/mime.types;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; default_type application/octet-stream;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; log_format filter '$remote_addr &lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;$time_local&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; $status $bytes_sent $request_time &amp;quot;$request&amp;quot;';&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; keepalive_timeout &amp;nbsp; &amp;nbsp; &lt;span style=""&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; send_timeout &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=""&gt;5&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; client_body_timeout &amp;nbsp; &lt;span style=""&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; client_header_timeout &lt;span style=""&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; tcp_nopush &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;on;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; tcp_nodelay &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; on;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; reset_timedout_connection on;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; sendfile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;on;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; server_tokens &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; off;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; gzip &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;off;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; include /etc/nginx/conf.d/*.conf;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; include /etc/nginx/sites-enabled/*;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
/etc/nginx/sites-available/default
&lt;div class="text" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;ol&gt;&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;limit_req_zone $binary_remote_addr zone=req_php:10m rate=2r/s;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;limit_zone conn_php $binary_remote_addr 10m;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;limit_zone conn_static $binary_remote_addr 10m;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;fastcgi_cache_path /var/lib/nginx/cache levels= keys_zone=fcgi_php:10m max_size=512m inactive=1d;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;server &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; listen &lt;span style=""&gt;80&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; server_name example.net;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; access_log /var/log/nginx/example.access.log filter;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location = / &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_req zone=req_php;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_conn conn_php &lt;span style=""&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rewrite .* /forum/index.php permanent;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location = /forum &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_req zone=req_php;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_conn conn_php &lt;span style=""&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rewrite .* /forum/index.php permanent;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location = /forum/ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_req zone=req_php;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_conn conn_php &lt;span style=""&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rewrite .* /forum/index.php permanent;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location / &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root /var/www/example;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; index index.php index.html index.htm;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; error_page &amp;nbsp; 500 502 503 504 &amp;nbsp;/50x.html;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location = /50x.html &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root &amp;nbsp; /var/www/nginx-default;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ ^/forum/attachments/.*\.php$ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deny all;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ \.php$ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_req zone=req_php burst=&lt;span style=""&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; limit_conn conn_php &lt;span style=""&gt;4&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set $userid $http_if_modified_since|$http_if_none_match|$cookie_CookieSMF;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;$http_cookie !~ CookieSMF&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set $userid &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;$query_string ~ ^action=dlattach\;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set $userid &amp;quot;&amp;quot;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_pass &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 127.0.0.1:&lt;span style=""&gt;9000&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_index &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;index.php;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_param &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SCRIPT_FILENAME /var/www/example$fastcgi_script_name;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_pass_header &amp;nbsp; &amp;nbsp;Cookie;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_ignore_headers Cache-Control Expires;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fcgi_php;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache_min_uses &lt;span style=""&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache_key &amp;nbsp; &amp;nbsp; &amp;nbsp;$request_method|$host|$request_uri|$userid;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache_valid &amp;nbsp; &amp;nbsp;301 8h;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache_valid &amp;nbsp; &amp;nbsp;302 404 1h;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_cache_valid &amp;nbsp; &amp;nbsp;200 15m;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; include /etc/nginx/fastcgi_params;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; limit_conn conn_static &lt;span style=""&gt;8&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ \.inc$ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deny all;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ \.bak$ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deny all;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ \~$ &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deny &amp;nbsp;all;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; location ~ /\.ht &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deny &amp;nbsp;all;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style="font-weight: normal; vertical-align:top;font: normal normal 130% 'Courier New', Courier, monospace; color: #003030;"&gt;&lt;div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;color: #000020;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2927573342244378548-6072762641777027625?l=webblog.pilin.name' alt='' /&gt;&lt;/div&gt;</description><link>http://webblog.pilin.name/2009/10/nginx-smf-debian-5-ddos.html</link><author>noreply@blogger.com (ww898)</author><thr:total>0</thr:total></item></channel></rss>