{"id":245549,"date":"2014-12-21T23:12:03","date_gmt":"2014-12-21T19:12:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=245549"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=245549","title":{"rendered":"<span class=\"post_title\">\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 php \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. suphp<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u0412 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u043e\u0442 <a href=\"http:\/\/habrahabr.ru\/users\/bondbig\/\" class=\"user_link\">bondbig<\/a>&#8216;a \u043f\u0440\u043e\u0437\u0432\u0443\u0447\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/245293\/#comment_8172409\">\u0432\u043e\u043f\u0440\u043e\u0441<\/a>: \u00ab\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043b\u0443\u0447\u0448\u0435, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 php \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (5.3 \u0438 5.5, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).\u00bb \u0418 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 suphp, \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0430 \u043e\u043f\u0438\u0441\u0430\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0443\u044e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e.<\/p>\n<p>  suphp \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f apache, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e mod_php \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a apache \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u0432\u0437\u043b\u043e\u043c\u0430\u0432 1 \u0441\u0430\u0439\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0430\u0439\u0442\u0430\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (\u0432\u0435\u0434\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e apache \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435). \u041d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0438 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c suphp \u0441 mtm-itk, \u0441\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 suphp \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 (\u0434\u0430, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435), \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438 \u0436\u0430\u043b\u043e\u0431 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u043c\u043e\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e. <br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u044f \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 CentOS 6, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u0438 \u0443 \u0432\u0430\u0441 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0433\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430. \u041d\u0443\u0436\u043d\u043e \u0440\u0435\u0441\u0435\u0442\u0430\u043f\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u00ab\u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438, \u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u00bb, \u0430 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0442\u0443\u0442. <br \/>  \u0418\u0442\u0430\u043a \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f:  <\/p>\n<ul>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440<\/li>\n<li>apache<\/li>\n<li>\u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 2 \u0432\u0435\u0440\u0441\u0438\u0438 php \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/li>\n<li>mod_suphp<\/li>\n<li>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435<\/li>\n<\/ul>\n<p>  1) \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f, \u044f \u0432\u043e\u0437\u044c\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e \u0432 \u043d\u0435\u0435 Centos 6 minimal \u0438 \u0432\u0432\u0435\u0434\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0442 \u0440\u0443\u0442\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<pre><code class=\"bash\">yum -y update   yum -y groupinstall &quot;Development Tools&quot; yum -y install epel-release yum -y install httpd-devel httpd php php-common php-gd php-xml php-mbstring libxml2-devel libapreq2 libapreq2-devel wget vim screen links  <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043a \u043d\u0435\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0439 <a href=\"https:\/\/fedoraproject.org\/wiki\/EPEL\">epel<\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c apache, php (5.3) \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432.<\/p>\n<p>  2) \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e php. \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u044f \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432:  <\/p>\n<pre><code class=\"bash\">cd \/usr\/src\/ wget http:\/\/ru2.php.net\/get\/php-5.6.2.tar.gz\/from\/this\/mirror -O php.tar.gz tar xfz php.tar.gz cd php-5.6.2\/ .\/configure && make install <\/code><\/pre>\n<p>  \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0438 php 5.6 \u0432\u0441\u0442\u0430\u043b \u0432 \/usr\/local\/bin\/.<\/p>\n<p>  \u0412\u0430\u043c \u0436\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430, \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/habrahabr.ru\/post\/47590\/\">Nix<\/a>) \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u043e\u0441\u043b\u0430\u0432\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u043d\u0430 \u0431\u043e\u0435\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0442\u043e \u0432\u0430\u043c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u0439 \u043a .\/configure.<\/p>\n<p>  3) \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c suphp:  <\/p>\n<pre><code class=\"bash\">cd \/usr\/src\/ wget http:\/\/www.suphp.org\/download\/suphp-0.7.2.tar.gz tar xfz suphp-0.7.2.tar.gz cd suphp-0.7.2 autoreconf -f -i .\/configure --with-apr=\/usr\/bin\/apr-1-config && make install <\/code><\/pre>\n<p>  (\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u0438 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u043c\u0443 \u043f\u0443\u043d\u043a\u0442\u0443). <\/p>\n<p>  4) \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c apache: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0438\u0440\u0442. \u0445\u043e\u0441\u0442\u044b\\\u043f\u0430\u043f\u043a\u0438, \u0437\u0430\u0434\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 (\u043e\u0442 \u0447\u044c\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 php \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c).   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">httpd.conf<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">cat &gt; \/etc\/httpd\/conf\/httpd.conf &lt;&lt; EOF ServerRoot &quot;\/etc\/httpd&quot;  Listen 80  LoadModule authz_host_module modules\/mod_authz_host.so LoadModule mime_magic_module modules\/mod_mime_magic.so LoadModule headers_module modules\/mod_headers.so LoadModule mime_module modules\/mod_mime.so LoadModule dir_module modules\/mod_dir.so LoadModule rewrite_module modules\/mod_rewrite.so  LoadModule suphp_module modules\/mod_suphp.so  suPHP_Engine on suPHP_AddHandler application\/x-httpd-php5 # \u042d\u0442\u0438 2 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438\u0437 suphp.conf, \u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0438\u0436\u0435 suPHP_AddHandler application\/x-httpd-php56  TypesConfig \/etc\/mime.types User apache Group apache DirectoryIndex index.php MIMEMagicFile conf\/magic  DocumentRoot &quot;\/var\/www\/html&quot;  &lt;Directory &quot;\/var\/www\/html&quot;&gt;  #\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 &quot;\u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439&quot;, \u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u0442\u0443\u0442    suPHP_UserGroup apache apache     Options Indexes FollowSymLinks    Order allow,deny    Allow from all &lt;\/Directory&gt; EOF <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  5) \u041a\u043e\u043d\u0444\u0438\u0433 suphp. \u0412 \u043d\u0435\u043c \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u043a\u0446\u0438\u044e handlers, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0442\u0438 \u0434\u043e \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0438\u0445 \u00ab\u0438\u043c\u0435\u043d\u0430\u00bb. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u0432 <a href=\"http:\/\/www.suphp.org\/DocumentationView.html?file=CONFIG\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">suphp.conf<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">cat &gt; \/usr\/local\/etc\/suphp.conf &lt;&lt; EOF [global] logfile=\/var\/log\/suphp.log loglevel=info webserver_user=apache docroot=\/ errors_to_browser=false env_path=&quot;\/bin:\/usr\/bin&quot; umask=0022 min_uid=1 [handlers] application\/x-httpd-php5=&quot;php:\/usr\/bin\/php-cgi&quot; application\/x-httpd-php56=&quot;php:\/usr\/local\/bin\/php-cgi&quot; EOF <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  6) \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0432\u0441\u0435\u043c \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c 2 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 php. \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b .htaccess, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 \u00abAddHandler\u00bb \u0432 \u043d\u0435\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">mkdir -p \/var\/www\/html\/53 && mkdir -p \/var\/www\/html\/56 && echo &quot;&lt;?php phpinfo(); ?&gt;&quot; &gt; \/var\/www\/html\/53\/index.php && echo &quot;&lt;?php phpinfo(); ?&gt;&quot; &gt; \/var\/www\/html\/56\/index.php && echo &quot;AddHandler application\/x-httpd-php5 .php&quot; &gt; \/var\/www\/html\/53\/.htaccess && echo &quot;AddHandler application\/x-httpd-php56 .php&quot; &gt; \/var\/www\/html\/56\/.htaccess && chown -R apache:apache \/var\/www\/html <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u0432\u0441\u0435. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c apache, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c iptables (\u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0439\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0441\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u041f\u041a) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<pre><code class=\"bash\">service httpd restart service iptables stop links2 -dump http:\/\/localhost\/53 | grep 'PHP Version' links2 -dump http:\/\/localhost\/56 | grep 'PHP Version' <\/code><\/pre>\n<p>  \u0415\u0449\u0435 \u0440\u0430\u0437 \u043e\u0442\u043c\u0435\u0447\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0445\u0430\u0443\u0442\u0443\u0448\u043a\u0430, \u0430 \u043b\u0438\u0448\u044c \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.      \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\/245549\/\"> http:\/\/habrahabr.ru\/post\/245549\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u0412 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u043e\u0442 <a href=\"http:\/\/habrahabr.ru\/users\/bondbig\/\" class=\"user_link\">bondbig<\/a>&#8216;a \u043f\u0440\u043e\u0437\u0432\u0443\u0447\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/245293\/#comment_8172409\">\u0432\u043e\u043f\u0440\u043e\u0441<\/a>: \u00ab\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043b\u0443\u0447\u0448\u0435, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 php \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (5.3 \u0438 5.5, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).\u00bb \u0418 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 suphp, \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0430 \u043e\u043f\u0438\u0441\u0430\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0443\u044e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e.<\/p>\n<p>  suphp \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f apache, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e mod_php \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a apache \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u0432\u0437\u043b\u043e\u043c\u0430\u0432 1 \u0441\u0430\u0439\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0430\u0439\u0442\u0430\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (\u0432\u0435\u0434\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e apache \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435). \u041d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0438 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c suphp \u0441 mtm-itk, \u0441\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 suphp \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 (\u0434\u0430, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435), \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438 \u0436\u0430\u043b\u043e\u0431 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u043c\u043e\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e.   <\/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-245549","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/245549","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=245549"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/245549\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=245549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=245549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=245549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}