{"id":678,"date":"2013-03-14T13:15:12","date_gmt":"2013-03-14T11:15:12","guid":{"rendered":"http:\/\/prostohost.net\/blog\/?p=678"},"modified":"2013-03-14T13:18:11","modified_gmt":"2013-03-14T11:18:11","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-nginx-php-%d0%bd%d0%b0-%d0%b2%d1%8b%d0%b4%d0%b5%d0%bb%d0%b5%d0%bd%d0%bd%d1%8b%d0%b9-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%b8%d0%bb%d0%b8-vps","status":"publish","type":"post","link":"https:\/\/prostohosting.com\/community\/2013\/03\/%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-nginx-php-%d0%bd%d0%b0-%d0%b2%d1%8b%d0%b4%d0%b5%d0%bb%d0%b5%d0%bd%d0%bd%d1%8b%d0%b9-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%b8%d0%bb%d0%b8-vps\/","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 nginx + php \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 VPS"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430 . \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0439 nginx \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 apache,\u00a0 \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b.\u00a0 \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u044b\u0433\u043e\u0434\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f <a href=\"http:\/\/prostohost.net\/services\/vps.html\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 VPS<\/a> \u0433\u0434\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u0435\u0449\u044f\u0435\u043c\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/prostohost.net\/services\/dedicated.html\">\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. <\/a><\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<p><strong>1. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e nginx .<\/strong><\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c\u00a0 <a href=\"http:\/\/nginx.org\/ru\/download.html\" target=\"_blank\">http:\/\/nginx.org\/ru\/download.html<\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e , \u0433\u0434\u0435 \u043c\u044b \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c<\/p>\n<p>#cd \/usr\/local\/src\/<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>#wget http:\/\/nginx.org\/download\/nginx-1.2.7.tar.gz<\/p>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/p>\n<p># tar xzf nginx.1.2.7.tar.gz<\/p>\n<p>#cd nginx-1.2.7\/<\/p>\n<p><strong>2. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c nginx \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 . <\/strong><\/p>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 pcre\u00a0 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c <a href=\"http:\/\/sourceforge.net\/projects\/pcre\/files\/pcre\/\" target=\"_blank\">http:\/\/sourceforge.net\/projects\/pcre\/files\/pcre\/<\/a><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 pcre , \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c nginx<\/p>\n<p>#cd nginx-1.2.7\/<\/p>\n<p>#.\/configure &#8212;user=nginx &#8212;group=nginx &#8212;with-http_ssl_module &#8212;with-http_realip_module &#8212;with-http_addition_module &#8212;with-http_sub_module &#8212;with-http_dav_module &#8212;with-http_gzip_static_module &#8212;with-mail &#8212;with-mail_ssl_module &#8212;with-pcre=\/usr\/local\/src\/pcre-8.13 &#8212;with-http_stub_status_module<\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0432\u0430\u0448\u0435\u043c\u0443 pcre , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438.<\/p>\n<p>#make &amp;&amp; make install<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e nginx \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \/usr\/local\/nginx\/ \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212;prefix=\/\u0432\u0430\u0448\/\u043f\u0443\u0442\u044c\/ \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 nginx.<\/p>\n<p><strong>3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c php \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 <\/strong><\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e php \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0439\u0442\u0435.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c php .<\/p>\n<p>.\/configure &#8212;enable-fpm &#8212;with-libdir=lib64 &#8212;with-curl=\/usr &#8212;with-gettext &#8212;with-kerberos &#8212;with-openssl &#8212;with-mcrypt &#8212;with-mhash &#8212;with-mysql=\/usr &#8212;with-pear &#8212;with-zlib &#8212;with-zlib-dir=\/usr\/ &#8212;enable-zip &#8212;enable-bcmath &#8212;enable-magic-quotes &#8212;enable-sockets &#8212;enable-mbstring &#8212;with-dom=\/usr &#8212;with-dom=\/usr &#8212;with-dom-xslt=\/usr &#8212;with-xsl &#8212;with-gd &#8212;with-freetype-dir=\/usr\/local\/lib &#8212;with-jpeg-dir=\/usr\/local\/lib &#8212;with-png-dir=\/usr\/local\/lib<\/p>\n<p>\u0412\u0430\u0448\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 php \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c,\u00a0 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 GD \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443,\u00a0 \u0442\u043e &#8212;with-gd &#8212;with-freetype-dir=\/usr\/local\/lib &#8212;with-jpeg-dir=\/usr\/local\/lib &#8212;with-png-dir=\/usr\/local\/lib \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 # make &amp;&amp; make install<\/p>\n<p><strong>4. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c php-fpm <\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 php \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/usr\/local\/etc\/\u00a0 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0444\u0430\u0439\u043b php-fpm.conf<\/p>\n<p>\u0412 \u043d\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/p>\n<p>user = nobody<br \/>\ngroup = nobody<\/p>\n<p>listen = 127.0.0.1:9001<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u00a0 \/etc\/init.d\/php-fpm start<\/p>\n<p><strong>5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nginx+php-fpm <\/strong><\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 nginx.conf \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 server \u0434\u043e\u0431\u0430\u0432\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 .<\/p>\n<p>location ~ \\.php$ {<br \/>\nroot\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/usr\/local\/nginx\/html;<br \/>\nfastcgi_pass\u00a0\u00a0 localhost:9001;<br \/>\nfastcgi_index\u00a0 index.php;<br \/>\nfastcgi_param\u00a0 SCRIPT_FILENAME\u00a0 \/usr\/local\/nginx\/html$fastcgi_script_name;<br \/>\ninclude\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 fastcgi_params;<\/p>\n<p>fastcgi_intercept_errors on;<br \/>\nfastcgi_buffers 256 16k;<br \/>\nfastcgi_buffer_size 32k;<br \/>\nfastcgi_connect_timeout 10s;<br \/>\n}<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 nginx<\/p>\n<p>\/usr\/local\/nginx\/sbin\/nginx -c \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u0442\u0435\u0445\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u043d\u0430\u0448\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430 . \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0439 nginx \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 apache,\u00a0 \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b.\u00a0 \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u044b\u0433\u043e\u0434\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 VPS \u0433\u0434\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u0435\u0449\u044f\u0435\u043c\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041d\u0430\u0447\u043d\u0435\u043c. 1. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e nginx . \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":""},"categories":[43],"tags":[],"_links":{"self":[{"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/posts\/678"}],"collection":[{"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/comments?post=678"}],"version-history":[{"count":3,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/posts\/678\/revisions"}],"predecessor-version":[{"id":680,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/posts\/678\/revisions\/680"}],"wp:attachment":[{"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/media?parent=678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/categories?post=678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prostohosting.com\/community\/wp-json\/wp\/v2\/tags?post=678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}