{"id":213739,"date":"2014-02-25T08:19:04","date_gmt":"2014-02-25T04:19:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=213739"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=213739","title":{"rendered":"<span class=\"post_title\">NginX \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0445\u0430\u0431\u0440\u043e \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0441 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u043e\u0439 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u043d\u0435 \u0440\u043e\u0434\u043d\u043e\u0439 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0438\u0448\u0443 \u0438 \u0433\u043e\u0432\u043e\u0440\u044e \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438\u043d\u043e\u0448\u0443 \u0441\u0432\u043e\u0438 \u0438\u0437\u0432\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u043e \u0445\u043e\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u043e\u0434\u0430 \u0434\u0432\u0430 \u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 HTML+PHP+MSSQL \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e WEB-\u0447\u0430\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0435\u0439\u0448\u0435\u043c WEB-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 Apache. \u041d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 WEB-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u0438 \u0441\u043f\u043e\u0440\u043e\u0432 \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e. \u041f\u0440\u043e\u0448\u0443 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/124\/79d\/be0\/12479dbe099929c17bf1cb19795557e0.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u044b:<\/p>\n<p>  1) NginX \u2014 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430<br \/>  2) \u0414\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 NginX.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430 \u043c\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 CentOS 6.4<\/p>\n<p>  \u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0448\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<blockquote><p><b>cd \/etc\/sysconfig\/network-scripts<\/p>\n<p>  vi ifcfg-eth0<\/b><\/p>\n<p>  DEVICE=eth0<br \/>  HWADDR=00:0C:33:6a:90:F8<br \/>  TYPE=Ethernet<br \/>  UUID=de83281a-sa20-4791-b588-5621718adf4d<br \/>  ONBOOT=yes<br \/>  NM_CONTROLLED=yes<br \/>  BOOTPROTO=static<br \/>  IPADDR=217.11.175.73<br \/>  NETMASK=255.255.255.224<br \/>  GATEWAY=217.11.175.33<br \/>  DNS1=217.11.190.2  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c<\/p>\n<blockquote><p><b>cd \/etc\/sysconfig\/network-scripts<\/p>\n<p>  vi ifcfg-eth0<\/b><\/p>\n<p>  DEVICE=eth1<br \/>  HWADDR=00:0\u0412:35:6a:90:F3<br \/>  TYPE=Ethernet<br \/>  UUID=de83281a-sa10-4791-b577-5621718adf4d<br \/>  ONBOOT=yes<br \/>  NM_CONTROLLED=yes<br \/>  BOOTPROTO=static<br \/>  IPADDR=192.168.1.3<br \/>  NETMASK=255.255.255.0  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u043d\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430c\u0442\u0440\u043e\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430<\/p>\n<p>  &#8212;\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b \u0432 CentOS  <\/p>\n<blockquote><p>yum update -y<\/p><\/blockquote>\n<blockquote><p># wget <a href=\"http:\/\/nginx.org\/packages\/rhel\/6\/noarch\/RPMS\/nginx-release-rhel-6-0.el6.ngx.noarch.rpm\">nginx.org\/packages\/rhel\/6\/noarch\/RPMS\/nginx-release-rhel-6-0.el6.ngx.noarch.rpm<\/a><br \/>  # rpm -ivh nginx-release-rhel-6-0.el6.ngx.noarch.rpm  <\/p><\/blockquote>\n<p>   \u2014 \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Nginx  <\/p>\n<blockquote><p>yum install nginx -y<\/p><\/blockquote>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435   <\/p>\n<blockquote><p>\/etc\/nginx<\/p><\/blockquote>\n<p>  \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 NginX-\u0430, \u0434\u0430\u043b\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0431\u0435\u043a\u0430\u043f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430   <\/p>\n<blockquote><p>cp nginx.conf \/etc\/nginx\/nginx.conf.backup<\/p><\/blockquote>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b\u0430  <\/p>\n<blockquote><p>rm nginx.conf<\/p><\/blockquote>\n<blockquote><p>vi nginx.conf<\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/p>\n<blockquote><p># \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441<br \/>  user nginx;<\/p>\n<p>  # 3 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<br \/>  worker_processes 3;<\/p>\n<p>  # \u041b\u043e\u0433 \u0434\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a<br \/>  error_log \/var\/log\/nginx\/error.log debug;<\/p>\n<p>  events {<br \/>   # \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439<br \/>   worker_connections 1024;<br \/>   }<\/p>\n<p>  http {<\/p>\n<p>  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 mime<br \/>   include mime.types;<br \/>   # mime-\u0442\u0438\u043f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<br \/>   default_type application\/octet-stream;<br \/>   client_header_timeout 3m;<br \/>   client_body_timeout 3m;<br \/>   send_timeout 3m;<br \/>   sendfile on;<\/p>\n<p>  # \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<br \/>   # \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 proxy_pass \u0438 fastcgi_pass.<br \/>   upstream web {<br \/>   #\u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0445\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u044e \u043f\u043e \u043f\u0435\u0440\u0432\u044b\u043c 4-\u043c \u0430\u043a\u0442\u0435\u0442\u0430\u043c IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0435\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<br \/>   ip_hash;<br \/>   # \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0437\u0430\u0434\u0430\u0451\u0442 \u0438\u043c\u044f \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043c\u044b \u0431\u0443\u0434\u0435\u043c<br \/>   # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u00abpv\u00bb \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 proxy_pass<br \/>   server 192.168.28.8 weight=2; #max_fails=60 fail_timeout=2s;<br \/>   server 192.168.28.9 weight=2; #max_fails=60 fail_timeout=2s;<\/p>\n<p>  }<br \/>   server {<br \/>   # \u0421\u043b\u0443\u0448\u0430\u0442\u044c 80 \u043f\u043e\u0440\u0442<br \/>   listen 80;<br \/>   location \/ {<\/p>\n<p>  #\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 proxy_pass \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435<br \/>   proxy_pass <a href=\"http:\/\/web;\">web;<\/a><br \/>   # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438<br \/>   include \/etc\/nginx\/proxy.conf;<\/p>\n<p>  }<br \/>   }<br \/>  }<\/p>\n<\/blockquote>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0444\u0430\u0439\u043b <b>proxy.conf<\/b> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<blockquote><p>proxy_redirect off;<br \/>  proxy_set_header Host $host;<br \/>  proxy_set_header X-Real-IP $remote_addr;<br \/>  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>  client_max_body_size 10m;<br \/>  client_body_buffer_size 128k;<br \/>  proxy_connect_timeout 90;<br \/>  proxy_send_timeout 90;<br \/>  proxy_read_timeout 90;<br \/>  proxy_buffers 32 4k;<br \/>  proxy_cache_bypass http;  <\/p><\/blockquote>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  <a name=\"habracut\"><\/a>    \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\/213739\/\"> http:\/\/habrahabr.ru\/post\/213739\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0445\u0430\u0431\u0440\u043e \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0441 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u043e\u0439 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u043d\u0435 \u0440\u043e\u0434\u043d\u043e\u0439 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0438\u0448\u0443 \u0438 \u0433\u043e\u0432\u043e\u0440\u044e \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438\u043d\u043e\u0448\u0443 \u0441\u0432\u043e\u0438 \u0438\u0437\u0432\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u043e \u0445\u043e\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u043e\u0434\u0430 \u0434\u0432\u0430 \u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0430\u0434 \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 HTML+PHP+MSSQL \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e WEB-\u0447\u0430\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0435\u0439\u0448\u0435\u043c WEB-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 Apache. \u041d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 WEB-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u0438 \u0441\u043f\u043e\u0440\u043e\u0432 \u043c\u044b \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e. \u041f\u0440\u043e\u0448\u0443 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/124\/79d\/be0\/12479dbe099929c17bf1cb19795557e0.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u044b:<\/p>\n<p>  1) NginX \u2014 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430<br \/>  2) \u0414\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 NginX.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430 \u043c\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 CentOS 6.4<\/p>\n<p>  \u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0448\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<blockquote><p><b>cd \/etc\/sysconfig\/network-scripts<\/p>\n<p>  vi ifcfg-eth0<\/b><\/p>\n<p>  DEVICE=eth0<br \/>  HWADDR=00:0C:33:6a:90:F8<br \/>  TYPE=Ethernet<br \/>  UUID=de83281a-sa20-4791-b588-5621718adf4d<br \/>  ONBOOT=yes<br \/>  NM_CONTROLLED=yes<br \/>  BOOTPROTO=static<br \/>  IPADDR=217.11.175.73<br \/>  NETMASK=255.255.255.224<br \/>  GATEWAY=217.11.175.33<br \/>  DNS1=217.11.190.2  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c<\/p>\n<blockquote><p><b>cd \/etc\/sysconfig\/network-scripts<\/p>\n<p>  vi ifcfg-eth0<\/b><\/p>\n<p>  DEVICE=eth1<br \/>  HWADDR=00:0\u0412:35:6a:90:F3<br \/>  TYPE=Ethernet<br \/>  UUID=de83281a-sa10-4791-b577-5621718adf4d<br \/>  ONBOOT=yes<br \/>  NM_CONTROLLED=yes<br \/>  BOOTPROTO=static<br \/>  IPADDR=192.168.1.3<br \/>  NETMASK=255.255.255.0  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u043d\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430c\u0442\u0440\u043e\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430<\/p>\n<p>  &#8212;\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b \u0432 CentOS  <\/p>\n<blockquote><p>yum update -y<\/p><\/blockquote>\n<blockquote><p># wget <a href=\"http:\/\/nginx.org\/packages\/rhel\/6\/noarch\/RPMS\/nginx-release-rhel-6-0.el6.ngx.noarch.rpm\">nginx.org\/packages\/rhel\/6\/noarch\/RPMS\/nginx-release-rhel-6-0.el6.ngx.noarch.rpm<\/a><br \/>  # rpm -ivh nginx-release-rhel-6-0.el6.ngx.noarch.rpm  <\/p><\/blockquote>\n<p>   \u2014 \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Nginx  <\/p>\n<blockquote><p>yum install nginx -y<\/p><\/blockquote>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435   <\/p>\n<blockquote><p>\/etc\/nginx<\/p><\/blockquote>\n<p>  \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 NginX-\u0430, \u0434\u0430\u043b\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0431\u0435\u043a\u0430\u043f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430   <\/p>\n<blockquote><p>cp nginx.conf \/etc\/nginx\/nginx.conf.backup<\/p><\/blockquote>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b\u0430  <\/p>\n<blockquote><p>rm nginx.conf<\/p><\/blockquote>\n<blockquote><p>vi nginx.conf<\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/p>\n<blockquote><p># \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441<br \/>  user nginx;<\/p>\n<p>  # 3 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<br \/>  worker_processes 3;<\/p>\n<p>  # \u041b\u043e\u0433 \u0434\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a<br \/>  error_log \/var\/log\/nginx\/error.log debug;<\/p>\n<p>  events {<br \/>   # \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439<br \/>   worker_connections 1024;<br \/>   }<\/p>\n<p>  http {<\/p>\n<p>  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 mime<br \/>   include mime.types;<br \/>   # mime-\u0442\u0438\u043f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<br \/>   default_type application\/octet-stream;<br \/>   client_header_timeout 3m;<br \/>   client_body_timeout 3m;<br \/>   send_timeout 3m;<br \/>   sendfile on;<\/p>\n<p>  # \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<br \/>   # \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 proxy_pass \u0438 fastcgi_pass.<br \/>   upstream web {<br \/>   #\u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0445\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u044e \u043f\u043e \u043f\u0435\u0440\u0432\u044b\u043c 4-\u043c \u0430\u043a\u0442\u0435\u0442\u0430\u043c IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0435\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<br \/>   ip_hash;<br \/>   # \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0437\u0430\u0434\u0430\u0451\u0442 \u0438\u043c\u044f \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043c\u044b \u0431\u0443\u0434\u0435\u043c<br \/>   # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u00abpv\u00bb \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0435 proxy_pass<br \/>   server 192.168.28.8 weight=2; #max_fails=60 fail_timeout=2s;<br \/>   server 192.168.28.9 weight=2; #max_fails=60 fail_timeout=2s;<\/p>\n<p>  }<br \/>   server {<br \/>   # \u0421\u043b\u0443\u0448\u0430\u0442\u044c 80 \u043f\u043e\u0440\u0442<br \/>   listen 80;<br \/>   location \/ {<\/p>\n<p>  #\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 proxy_pass \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435<br \/>   proxy_pass <a href=\"http:\/\/web;\">web;<\/a><br \/>   # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438<br \/>   include \/etc\/nginx\/proxy.conf;<\/p>\n<p>  }<br \/>   }<br \/>  }<\/p>\n<\/blockquote>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0444\u0430\u0439\u043b <b>proxy.conf<\/b> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<blockquote><p>proxy_redirect off;<br \/>  proxy_set_header Host $host;<br \/>  proxy_set_header X-Real-IP $remote_addr;<br \/>  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>  client_max_body_size 10m;<br \/>  client_body_buffer_size 128k;<br \/>  proxy_connect_timeout 90;<br \/>  proxy_send_timeout 90;<br \/>  proxy_read_timeout 90;<br \/>  proxy_buffers 32 4k;<br \/>  proxy_cache_bypass http;  <\/p><\/blockquote>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/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-213739","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213739","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=213739"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213739\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}