{"id":226971,"date":"2014-06-20T18:23:02","date_gmt":"2014-06-20T14:23:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=226971"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=226971","title":{"rendered":"<span class=\"post_title\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0438 \u0448\u0443\u0441\u0442\u0440\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 Debian 7<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421\u0442\u0430\u0442\u044c\u044f, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c VPS \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0447\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439, \u0442\u0430\u043a \u0438 \u0448\u0443\u0441\u0442\u0440\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. <br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0430:<\/p>\n<p>  Apache 2.2 + PHP 5.4.4 + MySQL 5.5 + NGINX 1.2.1 + eAccelerator + memcached + vsftpd 3.0.2 + exim.<\/p>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 Debian 7.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u041e\u0421, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\">apt-get update apt-get dist-upgrade<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0442\u0430\u0432\u0438\u043c \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u043e\u0444\u0442:  <\/p>\n<pre><code class=\"bash\">apt-get install htop atop vsftpd exim4-base exim4-daemon-light mailutils rcconf apache2 apache2-mpm-itk nginx mysql-server-5.5 mysql-client-5.5 php5 php5-dev memcached libmysqlclient-dev apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 libapache2-mod-ruby php5-common php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-common php5-ming php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl make automake checkinstall gcc gzip libreadline-dev libssl-dev libncurses5-dev zlib1g-dev<\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0430\u0441 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root \u0411\u0414 MySQL, \u0432\u0432\u043e\u0434\u0438\u043c.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0444\u0442\u0430, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u0412\u0441\u0435 \u0441\u0430\u0439\u0442\u044b \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/home\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f_\u0441\u0430\u0439\u0442\u0430, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438. \u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441\u0430\u0439\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 3 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438: tmp (\u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0435\u0441\u0441\u0438\u0439), logs (\u043b\u043e\u0433\u0438 \u0441\u0430\u0439\u0442\u0430), public_html (\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441\u0430\u0439\u0442\u0430).<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f dapf \u0441 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u043e\u0439, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0441 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c \u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u043e\u043c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u0438:  <\/p>\n<pre><code class=\"bash\">useradd dapf -b \/home -m -U -s \/bin\/false<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f dapf:  <\/p>\n<pre><code class=\"bash\">passwd dapf <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0430\u0432 \u0438 \u0433\u0440\u0443\u043f\u043f\u044b:  <\/p>\n<pre><code class=\"bash\">mkdir -p -m 755 \/home\/dapf\/dapf.ru\/public_html mkdir -p -m 777 \/home\/dapf\/dapf.ru\/logs mkdir -p -m 777 \/home\/dapf\/dapf.ru\/tmp chmod 755 \/home chmod 755 \/home\/dapf chmod +t \/home\/dapf\/dapf.ru\/logs chmod +t \/home\/dapf\/dapf.ru\/tmp chown -R dapf:dapf \/home\/dapf<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0440\u0435\u0442\u0438\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e www-data:  <\/p>\n<pre><code class=\"bash\">usermod -s \/bin\/false www-data<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Apache.<br \/>  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u0438:  <\/p>\n<pre><code class=\"bash\">a2enmod ssl a2enmod rewrite a2enmod suexec a2enmod include<\/code><\/pre>\n<p>  <habracut\/><br \/>  \u041f\u0440\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u043e\u0440\u0442\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/apache2\/ports.conf:  <\/p>\n<pre><code class=\"bash\">nano \/etc\/apache2\/ports.conf<\/code><\/pre>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c 80 \u043f\u043e\u0440\u0442 \u043d\u0430 81 (\u0442.\u043a. \u043d\u0430 80\u043c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 nginx):  <\/p>\n<pre><code class=\"bash\">NameVirtualHost *:81 Listen 81<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 VPS \u0441\u043b\u0430\u0431\u0435\u043d\u044c\u043a\u0438\u0439 (256 \u043c\u0431 \u041e\u0417\u0423), \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \/etc\/apache2\/apache2.conf  <\/p>\n<pre><code class=\"bash\">nano \/etc\/apache2\/apache2.conf<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"bash\">KeepAlive Off StartServers 1 MinSpareServers 3 MaxSpareServers 6 ServerLimit 24 MaxClients 24 MaxRequestsPerChild 3000 <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 VirtualHost (\u0441\u0430\u0439\u0442):  <\/p>\n<pre><code class=\"bash\">nano \/etc\/apache2\/sites-available\/dapf.ru<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">&lt;VirtualHost *:81&gt; ServerName www.dapf.ru ServerAlias dapf.ru ServerAdmin support@dapf.ru DocumentRoot &quot;\/home\/dapf\/dapf.ru\/public_html&quot;   &lt;Directory \/&gt;   Options FollowSymLinks   AllowOverride None   &lt;\/Directory&gt;   &lt;Directory \/home\/dapf\/dapf.ru\/public_html\/&gt;   Options Indexes FollowSymLinks MultiViews   AllowOverride All   Order allow,deny   allow from all   &lt;\/Directory&gt;   ErrorLog \/home\/dapf\/dapf.ru\/logs\/errors.log   LogLevel warn   CustomLog \/home\/dapf\/dapf.ru\/logs\/access.log combined   AssignUserId www-data dapf   php_admin_value open_basedir &quot;\/home\/dapf\/:.&quot;   php_admin_value upload_tmp_dir &quot;\/home\/dapf\/dapf.ru\/tmp&quot;   php_admin_value session.save_path &quot;\/home\/dapf\/dapf.ru\/tmp&quot; &lt;\/VirtualHost&gt;<\/code><\/pre>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f apache2-mpm-itk, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0445\u043e\u0441\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 AssignUserId www-data dapf, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c web-\u0448\u0435\u043b\u043b\u0443, \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u0440\u043e\u043c\u0435 \u0442\u0435\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u043e\u044f\u0442 \u043f\u0440\u0430\u0432\u0430 o+w. \u0422.\u0435. apache \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c php-\u0444\u0430\u0439\u043b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043d\u043e \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0434\u043b\u044f \u0445\u044d\u043a\u0435\u0440\u043e\u0432. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0430\u043f\u0430\u0447\u0443 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e www-data dapf, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 dapf dapf. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b open_basedir, upload_tmp_dir, session.save_path, \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0439 \u0441 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0432\u044b\u0448\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0430\u0439\u0442:  <\/p>\n<pre><code class=\"bash\">a2ensite dapf.ru<\/code><\/pre>\n<p>  \u0418 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0430\u043f\u0430\u0447:  <\/p>\n<pre><code class=\"bash\">service apache2 restart<\/code><\/pre>\n<p>  \u0421 \u0430\u043f\u0430\u0447\u0435\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c nginx.<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c gzip \u0441\u0436\u0430\u0442\u0438\u0435, \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f www-data \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c 1 \u044f\u0434\u0440\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.  <\/p>\n<pre><code class=\"bash\">nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">user www-data; worker_processes 1; pid \/var\/run\/nginx.pid; error_log \/var\/log\/nginx\/error.log; events {   worker_connections 768;   # multi_accept on; } http {   ##   # Basic Settings   ##   sendfile on;   tcp_nopush on;   tcp_nodelay on;   keepalive_timeout 65;   types_hash_max_size 2048;   # server_tokens off;   # server_names_hash_bucket_size 64;   # server_name_in_redirect off;   include \/etc\/nginx\/mime.types;   default_type application\/octet-stream;   ##   # Logging Settings   ##   access_log \/var\/log\/nginx\/access.log;   error_log \/var\/log\/nginx\/error.log;   ##   # Gzip Settings   ##   gzip on;   gzip_disable &quot;msie6&quot;;   # gzip_vary on;   gzip_proxied any;   gzip_comp_level 7; #Level Compress   gzip_buffers 16 8k;   gzip_http_version 1.1;   gzip_types text\/plain text\/css application\/json application\/x-javascri$   ##   # Virtual Host Configs   ##   include \/etc\/nginx\/conf.d\/*.conf;   include \/etc\/nginx\/sites-enabled\/*; } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0445\u043e\u0441\u0442\u0430:<\/p>\n<pre><code class=\"bash\">nano \/etc\/nginx\/sites-enabled\/dapf.ru<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">server { listen 80; server_name dapf.ru www.dapf.ru; access_log \/var\/log\/nginx.access_log; location ~* .(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3|docx|xlsx)$ { root \/home\/dapf\/dapf.ru\/public_html\/; error_page 404 = @fallback; index index.html index.php; access_log off; expires 30d; } location ~ \/.ht { deny all; } location \/ { proxy_pass http:\/\/127.0.0.1:81\/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $remote_addr; proxy_set_header Host $host; proxy_connect_timeout 60; proxy_send_timeout 90; proxy_read_timeout 90; proxy_redirect off; proxy_set_header Connection close; proxy_pass_header Content-Type; proxy_pass_header Content-Disposition; proxy_pass_header Content-Length; } location @fallback {   proxy_pass http:\/\/127.0.0.1:81;   proxy_set_header Host $host;   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;   proxy_set_header X-Forwarded-Proto $scheme;   proxy_set_header X-Real-IP $remote_addr;   } }  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430 \u0432\u0441\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u043f\u0430\u0447, \u0430 \u0437\u0430 \u0441\u0442\u0430\u0442\u0438\u043a\u0443 nginx, \u043f\u0440\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 404, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f mod_rewrite(\u0427\u041f\u0423), \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f @fallback \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u043f\u0430\u0447 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c nginx: <code>service nginx restart<\/code><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 FTP \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430 vsftpd  <\/p>\n<pre><code class=\"bash\">nano \/etc\/vsftpd.conf<\/code><\/pre>\n<p>  \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0451 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:  <\/p>\n<pre><code class=\"bash\">listen=YES anonymous_enable=NO local_enable=YES write_enable=YES pasv_min_port=50000 pasv_max_port=60000 dirmessage_enable=YES xferlog_enable=YES file_open_mode=0644 local_umask=022 connect_from_port_20=YES ascii_upload_enable=YES ascii_download_enable=YES ftpd_banner=Welcome to our FTP service. chroot_local_user=YES allow_writeable_chroot=YES secure_chroot_dir=\/var\/run\/vsftpd pam_service_name=vsftpd rsa_cert_file=\/etc\/ssl\/certs\/vsftpd.pem<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0432\u0445\u043e\u0434 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 FTP \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \/etc\/pam.d\/vsftpd, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 FTP \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438.  <\/p>\n<pre><code class=\"bash\">nano \/etc\/pam.d\/vsftpd<\/code><\/pre>\n<p>  \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443: auth required pam_shells.so  <\/p>\n<pre><code class=\"bash\">#auth  required  pam_shells.so<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c vsftpd \u0438 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u043e\u0439\u0442\u0438:  <\/p>\n<pre><code class=\"bash\">service vsftpd restart<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430: 500 OOPS: vsftpd: refusing to run with writable root inside chroot(), \u043d\u0435 \u0440\u0430\u0441\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u044d\u0442\u043e \u0431\u0430\u0433 vsftpd \u0438 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:  <\/p>\n<pre><code class=\"bash\">echo &quot;deb http:\/\/ftp.us.debian.org\/debian jessie main contrib non-free&quot; &gt;&gt; \/etc\/apt\/sources.list aptitude update aptitude upgrade vsftpd echo &quot;allow_writeable_chroot=YES&quot; &gt;&gt; \/etc\/vsftpd.conf service vsftpd restart<\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 vsftpd, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c MySQL.  <\/p>\n<pre><code class=\"bash\">nano \/etc\/mysql\/my.cnf <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432:  <\/p>\n<pre><code class=\"bash\">key_buffer = 16K max_allowed_packet = 1M thread_stack = 64K table_cache = 4 sort_buffer = 64K net_buffer_length = 2K<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b InnoDB, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 skip-innodb<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0435\u0433\u043e \u0411\u0414, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">echo &quot;CREATE USER '\u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445'@'localhost' IDENTIFIED BY '\u043f\u0430\u0440\u043e\u043b\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f'; GRANT USAGE ON * . * TO '\u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445'@'localhost' IDENTIFIED BY '\u043f\u0430\u0440\u043e\u043b\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0; CREATE DATABASE IF NOT EXISTS \u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; ; GRANT ALL PRIVILEGES ON \u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445 . * TO '\u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445'@'localhost';&quot; | mysql --user=root --password=\u043f\u0430\u0440\u043e\u043b\u044c_\u0440\u0443\u0442\u0430_\u043c\u0443\u0441\u043a\u0443\u043b\u0430 mysql <\/code><\/pre>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430_\u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0430\u0440\u043e\u043b\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c_\u0440\u0443\u0442\u0430_\u043c\u0443\u0441\u043a\u0443\u043b\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0438.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c PHP+ eAccelerator+ exim.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 exim, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:  <\/p>\n<pre><code class=\"bash\">dpkg-reconfigure exim4-config<\/code><\/pre>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u041e\u041a, \u043f\u043e\u0442\u043e\u043c internet site; mail is sent and received directly using SMTP, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0432\u0430\u0448 System mail name (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e dapf.ru), IP-addresses to listen on for incoming SMTP connections \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e 127.0.0.1, \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0432\u043a\u0443\u0441\u0443, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442\u0435 \u0434\u043e Root and postmaster mail recipient, \u0442\u0430\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0430\u0448 email \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u0438\u0441\u044c\u043c\u0430.<\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:  <\/p>\n<pre><code class=\"bash\">echo &quot;test&quot; | mail -s Test \u0432\u0430\u0448@email.com<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u043e \u043f\u0440\u0438\u0448\u043b\u043e, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c exim.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c eAccelerator.<\/p>\n<p>  \u041a\u0430\u0447\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"bash\">wget https:\/\/codeload.github.com\/eaccelerator\/eaccelerator\/legacy.tar.gz\/master -O ea.tar.gz tar xvfz ea.tar.gz<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 eaccelerator(\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e eaccelerator-eaccelerator-42067ac) \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"bash\">cd eaccelerator-eaccelerator-42067ac phpize .\/configure make make install<\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043a\u0435\u0448\u0430 eAccelerator  <\/p>\n<pre><code class=\"bash\">mkdir -p \/var\/cache\/eaccelerator chmod 0777 \/var\/cache\/eaccelerator<\/code><\/pre>\n<p>  \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b php.ini  <\/p>\n<pre><code class=\"bash\">nano \/etc\/php5\/apache2\/php.ini<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 eAccelerator, sendmail \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 exim, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442.\u0434.<br \/>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0434 [ PHP ] \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f eAccelerator  <\/p>\n<pre><code class=\"bash\">; eAccelerator configuration ; Note that eAccelerator may also be installed as a PHP extension or as a zend_extension ; If you are using a thread safe build of PHP you must use ; zend_extension_ts instead of zend_extension extension  = &quot;eaccelerator.so&quot; eaccelerator.shm_size  = &quot;16&quot; eaccelerator.cache_dir  = &quot;\/var\/cache\/eaccelerator&quot; eaccelerator.enable  = &quot;1&quot; eaccelerator.optimizer  = &quot;1&quot; eaccelerator.check_mtime  = &quot;1&quot; eaccelerator.debug  = &quot;0&quot; eaccelerator.filter  = &quot;&quot; eaccelerator.shm_max  = &quot;0&quot; eaccelerator.shm_ttl  = &quot;0&quot; eaccelerator.shm_prune_period  = &quot;0&quot; eaccelerator.shm_only  = &quot;0&quot; eaccelerator.compress  = &quot;1&quot; eaccelerator.compress_level  = &quot;9&quot; eaccelerator.allowed_admin_path = &quot;\/var\/www\/eaccelerator&quot;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c sendmail_path \u0438 \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e exim  <\/p>\n<pre><code class=\"bash\">sendmail_path = \/usr\/sbin\/exim -t<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:  <\/p>\n<pre><code class=\"bash\">;\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b display_errors =Off log_errors=On ;\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 disable_functions = exec,ini_get,ini_get_all,parse_ini_file,passthru,php_uname,popen,proc_open,shell_exec,show_source,system,dl, show_source, readfile, popen, cwd,getcwd ;\u041f\u043e \u0432\u043a\u0443\u0441\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: diskfreespace, disk_free_space, disk_total_space, eval, fileperms, fopen, opendir, phpinfo, phpversion, posix_getpwuid, posix_getgrgid, posix_uname, \u043d\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f. ;\u041f\u0440\u043e\u0447\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 error_reporting = E_ALL & ~ E_NOTICE <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 PHP \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0436\u0435\u043b\u0430\u043d\u0438\u044e, \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0432 \u0441\u0435\u0442\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u0443\u0447\u0430 \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 SSH \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0435, \u0442.\u043a. \u0432 Debian \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0432\u0441\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b my.iptables.rules  <\/p>\n<pre><code class=\"bash\">nano \/etc\/my.iptables.rules<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">*filter -A INPUT -i lo -j ACCEPT -AINPUT -d 127.0.0.0\/8 -jREJECT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A OUTPUT -j ACCEPT -A INPUT -p tcp --dport 80 -j ACCEPT -A INPUT -p tcp --dport 443 -j ACCEPT -A INPUT -p tcp --dport 20 -j ACCEPT -A INPUT -p tcp --dport 21 -j ACCEPT -A INPUT -p tcp --dport 50000 -j ACCEPT -A INPUT -p tcp --dport 60000 -j ACCEPT -A INPUT -p tcp -m state --state NEW --dport 20 -j ACCEPT -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A INPUT -m limit --limit 5\/min -j LOG --log-prefix &quot;iptables denied: &quot; --log-level 7 -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT <\/code><\/pre>\n<p>  \u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430:  <\/p>\n<pre><code class=\"bash\">iptables-restore &lt; \/etc\/my.iptables.rules iptables-save &gt; \/etc\/iptables.rules <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 iptables \u2013L<\/p>\n<p>  \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/network\/interfaces  <\/p>\n<pre><code class=\"bash\">nano \/etc\/network\/interfaces<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 iface lo inet loopback, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c  <\/p>\n<pre><code class=\"bash\">pre-up iptables-restore &lt; \/etc\/iptables.rules<\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c VPS. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/226971\/\"> http:\/\/habrahabr.ru\/post\/226971\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421\u0442\u0430\u0442\u044c\u044f, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c VPS \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0447\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439, \u0442\u0430\u043a \u0438 \u0448\u0443\u0441\u0442\u0440\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. <br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0430:<\/p>\n<p>  Apache 2.2 + PHP 5.4.4 + MySQL 5.5 + NGINX 1.2.1 + eAccelerator + memcached + vsftpd 3.0.2 + exim.<\/p>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u043e \u0447\u0443\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 Debian 7.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-226971","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/226971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226971"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/226971\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}