junfengfan 发表于 2012-05-23 13:23

openbsd5.1与php-fpm的问题

openbsd5.1 安装 php nginx f需要spawn-fastcgi ,可我发现现在packages里面有 php-fpm,
请问 php-fpm 如何配置,才能解析php文件,当然用spawn-fastcgi 可以解析php文件       /var/nginx/html/里面加个info.php ,出现 File not found.
好的,谢谢

ulovko 发表于 2012-05-23 14:14

本帖最后由 ulovko 于 2012-05-23 14:15 编辑

# echo 'php_fpm_enable="YES"' >> /etc/rc.conf
# /usr/local/etc/rc.d/php-fpm start
# vim /usr/local/etc/php-fpm.confEdit the users and groups for the Unix socket and the processes
Address and port on which PHP-FPM will be listening
Amount of simultaneous requests that will be served
IP address(es) allowed to connect to PHP-FPM
# cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini   (初始化配置文件)

# cd /usr/ports/lang/php5/ && make showconfig
===> The following configuration options are available for php5-5.3.11:
   CLI=on "Build CLI version"
   CGI=on "Build CGI version"
   FPM=on "Build FPM version (experimental)"   ==> PHP-FPM确保开启!
   APACHE=on "Build Apache module"
   AP2FILTER=off " Use Apache 2.x filter interface (experimental)"
   DEBUG=off "Enable debug"
   SUHOSIN=on "Enable Suhosin protection system"
   MULTIBYTE=off "Enable zend multibyte support"
   IPV6=on "Enable ipv6 support"
   MAILHEAD=off "Enable mail header patch"
   LINKTHR=off "Link thread lib (for threaded extensions)"
===> Use 'make config' to modify these settings

ulovko 发表于 2012-05-23 14:17

本帖最后由 ulovko 于 2012-05-23 14:17 编辑

# echo "<?php phpinfo(); ?>" > /var/nginx/html/info.php
# /usr/local/etc/rc.d/nginx restart
# firefox http://localhost

确保 目录权限,nginx root写的对不对!

lsstarboy 发表于 2012-05-23 14:42

应该是nginx配置错了。
原理是:php-fpm在9000端口,nginx把扩展名是php的文件转到这个9000端口上来。
页: [1]
查看完整版本: openbsd5.1与php-fpm的问题