<\/p>\n
\u6211\u5011\u5728\u4e4b\u524d\u4ecb\u7d39\u904ephp handler<\/a>\u3002<\/strong> \u4ee5\u4e0b\u76f4\u63a5\u4ee5\u8a2d\u5b9a\u7bc4\u4f8b\u8aaa\u660e(\u9069\u7528\u65bc centos 6.x\u7248):<\/span><\/strong><\/p>\n <\u9032\u884cphp-fpm\u7684\u5b89\u88dd><\/span><\/strong> 2.linux shell<\/a> >\u00a0 3.\u56de\u5230 whm > easyapache rebuilding \u5b8c\u6210\u5f8c\uff0c\u5728\u63a5\u4e0b\u4e00\u6b65<\/span><\/p>\n 4.\u56de\u5230linux shell<\/a>\u88e1\u8655\u7406\u00a0PHP-FPM \u8a2d\u5b9a\u6a94<\/span><\/strong><\/p>\n 5. php_fpm_BIN=@sbindir@\/php-fpm \u6539\u70ba (\u65b0\u8def\u9015\u52d9\u5fc5\u67e5\u8b49\uff0c\u624d\u4e0d\u6703error)<\/p>\n <\u8abf\u6574php-fpm.conf><\/span><\/strong><\/p>\n 6. 7. vim\u00a0\/usr\/etc\/php-fpm.conf 12. \u6700\u5f8c\u8a2d\u5b9a\u958b\u6a5f\u555f\u52d5\u00a0php-fpm<\/p>\n chkconfig php-fpm on<\/p>\n<\/div>\n (\u672c\u7bc7\u6559\u5b78\u7531unethost.com\u5ba2\u670d\u64b0\u5beb<\/a>)<\/strong><\/span><\/p>\n \u5ef6\u4f38\u95b1\u8b80:\u5982\u4f55\u5099\u4efdCpanel\u5f8c\u53f0\u5b89\u88dd\u7684\u5957\u88dd\u7a0b\u5f0f?<\/a><\/strong><\/p>\n \u5b89\u88dd\u4e0a\u8ff0\u7684\u8edf\u9ad4\uff0c\u6211\u5011\u63d0\u4f9b\u865b\u64ec\u4e3b\u6a5f\u8a66\u7528\uff0c\u4e03\u5929\u6eff\u610f\u4fdd\u8b49\uff0c<\/span><\/strong> \u6211\u5011\u5728\u4e4b\u524d\u4ecb\u7d39\u904ephp handler\u3002 \u5728\u6211\u5011\u865b\u64ec\u4e3b\u6a5f\u88e1\uff0c\u662f\u4f7f\u7528fastcgi\u7684\u8b80\u5beb\u65b9\u5f0f\uff0c \u5982\u679c\u5728\u4e00\u822c\u4e3b\u6a5f\u8981 … \u95b1\u8b80\u5168\u6587 \u5982\u4f55\u5728cpanel\u88e1\u5c07php handler\u8a2d\u70ba php-fpm<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[151,4],"tags":[214,50,60,910,174],"_links":{"self":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/3434"}],"collection":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/comments?post=3434"}],"version-history":[{"count":2,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/3434\/revisions"}],"predecessor-version":[{"id":3441,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/3434\/revisions\/3441"}],"wp:attachment":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/media?parent=3434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/categories?post=3434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/tags?post=3434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n\u5728\u6211\u5011\u865b\u64ec\u4e3b\u6a5f<\/a>\u88e1\uff0c\u662f\u4f7f\u7528fastcgi\u7684\u8b80\u5beb\u65b9\u5f0f\uff0c<\/strong>
\n\u5982\u679c\u5728\u4e00\u822c\u4e3b\u6a5f\u8981\u8ffd\u6c42\u66f4\u9ad8\u7684\u6548\u80fd\uff0c\u5247\u53ef\u4ee5\u8003\u616e\u4f7f\u7528php-fpm\u3002<\/strong><\/p>\n
\n1. \u767b\u5165 whm>Configure PHP and suEXEC
\n\u8a2d\u5b9a
\nPHP 5 Handler: none
\nApache suEXEC: off
\nApache Ruid2: off<\/p>\nvim\u00a0\/var\/cpanel\/easy\/apache\/rawopts\/all_php5
\n<\/code>\u52a0\u5165\u4e0b\u5217\u5169\u884c\u5f8c\u5b58\u6a94
\n--enable-fastcgi
\n--enable-fpm
\n<\/code><\/p>\n
\n\u4e26\u4f5c\u4e0b\u5217\u8a2d\u5b9a
\n(1). Select Apache 2.2.x
\n(2). Select PHP 5.4.x
\n(3). Disable Frontpage
\n(4). Disable Mod SuPHP
\n(5). Disable Mod Ruid2
\n(6). Select MPM Worker
\n(7). Disable MPM Prefork and MPM Event<\/p>\ncd \/home\/cpeasyapache\/src\/php-5.4.x\/sapi\/fpm\/<\/code>
\ncp init.d.php-fpm.in \/etc\/init.d\/php-fpm<\/code>
\nchmod 755 \/etc\/init.d\/php-fpm<\/code><\/p>\n
vim\u00a0\/etc\/init.d\/php-fpm
\n\u5c07
\nprefix=@prefix@
\nexec_prefix=@exec_prefix@<\/code><\/p>\n
\nphp_fpm_CONF=@sysconfdir@\/php-fpm.conf
\nphp_fpm_PID=@localstatedir@\/run\/php-fpm.pid<\/a><\/p>\n
\nprefix=
\nexec_prefix=
\nphp_fpm_BIN=\/usr\/local\/sbin\/php-fpm
\nphp_fpm_CONF=\/usr\/etc\/php-fpm.conf
\nphp_fpm_PID=\/var\/run\/php-fpm.pid<\/p>\n
\ncd \/home\/cpeasyapache\/src\/php-5.4.x\/sapi\/fpm\/<\/code>
\ncp php-fpm.conf.in \/usr\/etc\/php-fpm.conf<\/code><\/p>\n
\n\u8a2d\u5b9a
\nuser = nobody
\ngroup = nobody<\/p>\n
\nvim\u00a0\/usr\/local\/apache\/conf\/includes\/post_virtualhost_global.conf<\/div>\n
\nLoadModule fastcgi_module modules\/mod_fastcgi.so<\/code>
<IfModule mod_fastcgi.c><\/code>
\n FastCGIExternalServer \/usr\/local\/sbin\/php-fpm -host 127.0.0.1:9000<\/code>
\n AddHandler php-fastcgi .php<\/code><\/p>\n
#<LocationMatch \"\/status\"><\/code>
\n # SetHandler php-fastcgi-virt<\/code>
\n # Action php-fastcgi-virt \/usr\/local\/sbin\/php-fpm.fcgi virtual<\/code>
\n #<\/LocationMatch><\/code><\/p>\n
Action php-fastcgi \/usr\/local\/sbin\/php-fpm.fcgi<\/code>
\n ScriptAlias \/usr\/local\/sbin\/php-fpm.fcgi \/usr\/local\/sbin\/php-fpm<\/code><\/p>\n
<Directory \/usr\/local\/sbin><\/code>
\n Options ExecCGI FollowSymLinks<\/code>
\n SetHandler fastcgi-script<\/code>
\n Order allow,deny<\/code>
\n Allow from all<\/code>
\n <\/Directory><\/code>
\n <\/IfModule><\/code><\/p>\n<\/div>\n
\nwget http:\/\/www.fastcgi.com\/dist\/mod_fastcgi-2.4.6.tar.gz<\/code>
\ntar -xzf mod_fastcgi-2.4.6.tar.gz<\/code>
\ncd mod_fastcgi-2.4.6<\/code>
\ncp Makefile.AP2 Makefile<\/code><\/div>\n
\nmake
\nmake install<\/div>\n
\n\/etc\/init.d\/httpd restart<\/div>\n
\n\u5982\u679c\u5b89\u88dd\u904e\u7a0b\uff0c\u9047\u5230\u5176\u4ed6\u932f\u8aa4\u8a0a\u606f\uff0c
\n\u6216\u662f\u8981\u4f7f\u7528 php 5.5 , php5.6\uff0c\u5247\u8981\u984d\u5916\u8996\u8def\u9015\u9032\u884c\u8abf\u6574\u3002<\/div>\n
\n\u529f\u80fd\u5b8c\u6574\u4f7f\u7528\u4e0d\u53d7\u9650\u5236\uff0c\u6b61\u8fce\u9ede\u6211<\/a>\u7533\u8acb\u3002<\/span><\/strong><\/p>\n<\/div>\n