有经验的 发一下 5.0当前快照版的nginx php-fpm配置

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
freebsdpf
锂 Li
帖子: 2
注册时间: 2010-02-06 20:22

有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 freebsdpf » 2011-09-26 15:25

请有经验的朋友,写过配置过程OpenBSD 5.0 快照版的nginx php-fpm过程,自己测试了好几次 怎么都解析不了 php .:confused::confused:

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: 有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 leo » 2011-09-27 9:22

注册一年半就发了这一贴,弥足珍贵啊。:)
请先把自己的步骤写出来,别让想帮你的朋友猜谜语。

freebsdpf
锂 Li
帖子: 2
注册时间: 2010-02-06 20:22

回复: 有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 freebsdpf » 2011-09-28 8:33

# uname -a
OpenBSD aabbcc.cybpf.cn 5.0 GENERIC#59 i386
#
# pkg_info
femail-0.97p1 simple SMTP client
femail-chroot-0.97p3 simple SMTP client for chrooted apache
gettext-0.18.1p0 GNU gettext
jpeg-8c IJG's JPEG compression utilities
lftp-4.2.3 shell-like command line ftp and sftp client
libdnet-1.12p3 portable low-level networking library
libexecinfo-1.1p2 clone of backtrace facility found in the GNU libc
libiconv-1.14 character set conversion library
libidn-1.22 internationalized string handling
libtalloc-2.0.1 hierarchical memory pool system with destructors
libxml-2.7.8p2 XML parsing library
lua-5.1.4p2 powerful, light-weight programming language
mysql-client-5.1.58 multithreaded SQL database (client)
mysql-server-5.1.58p0 multithreaded SQL database (server)
nginx-1.0.5 robust and small HTTP server and mail proxy server
nmap-5.51p1 scan ports and fingerprint stack of network hosts
p5-Clone-0.31p1 recursively copy Perl datatypes
p5-DBD-mysql-4.019p0 MySQL drivers for the Perl DBI
p5-DBI-1.616 unified perl interface for database access
p5-FreezeThaw-0.43p2 module for converting structures to strings and back
p5-MLDBM-2.04 store multi-level hash structure in single-level tied hash
p5-Net-Daemon-0.43p0 extension for portable daemons
p5-Params-Util-1.00p2 utility to make parameter checking easier
p5-PlRPC-0.2018p1 module for writing rpc servers and clients
p5-SQL-Statement-1.33 sql parsing and processing
partial-php-5.2.17p6 server-side HTML-embedded scripting language
pcre-8.13 perl-compatible regular expression library
php-5.3.8p0 server-side HTML-embedded scripting language
php-fastcgi-5.3.8p0 stand-alone FastCGI version of PHP
php-fpm-5.3.8p0 stand-alone FPM version of PHP
php-gd-5.3.8p0 image manipulation extensions for php5
php-mysql-5.3.8p0 mysql database access extensions for php5
png-1.5.5 library for manipulating PNG images
popt-1.7p1 getopt(3)-like library with a number of enhancements
samba-3.5.11p1 SMB and CIFS client and server for UNIX
t1lib-5.1.0p2 Type 1 rasterizer library for UNIX/X11
tdb-1.2.1 trivial database library
wget-1.12p1 retrieve files from the web via HTTP, HTTPS and FTP
#

关键修改地方如下
/etc/nginx/nginx.conf
user www;

fastcgi_pass unix:/tmp/nginx.socket;
SCRIPT_FILENAME /var/nginx/html$fastcgi_script_name;


/etc/php-fpm.conf

listen = /tmp/nginx.socket
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
user = www
group = www


vi /etc/rc.local
/etc/rc.d/nginx start
/etc/rc.d/php_fpm start

终于配置对了

johnb
锂 Li
帖子: 2
注册时间: 2011-03-12 15:01

回复: 有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 johnb » 2011-11-27 20:38

我先回个贴一般工作忙,都是来看看 。

junfengfan
铜 Cu
帖子: 236
注册时间: 2010-02-03 18:37

回复: 有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 junfengfan » 2012-05-19 10:42

freebsdpf 写了:# uname -a
OpenBSD aabbcc.cybpf.cn 5.0 GENERIC#59 i386
#
# pkg_info
femail-0.97p1 simple SMTP client
femail-chroot-0.97p3 simple SMTP client for chrooted apache
gettext-0.18.1p0 GNU gettext
jpeg-8c IJG's JPEG compression utilities
lftp-4.2.3 shell-like command line ftp and sftp client
libdnet-1.12p3 portable low-level networking library
libexecinfo-1.1p2 clone of backtrace facility found in the GNU libc
libiconv-1.14 character set conversion library
libidn-1.22 internationalized string handling
libtalloc-2.0.1 hierarchical memory pool system with destructors
libxml-2.7.8p2 XML parsing library
lua-5.1.4p2 powerful, light-weight programming language
mysql-client-5.1.58 multithreaded SQL database (client)
mysql-server-5.1.58p0 multithreaded SQL database (server)
nginx-1.0.5 robust and small HTTP server and mail proxy server
nmap-5.51p1 scan ports and fingerprint stack of network hosts
p5-Clone-0.31p1 recursively copy Perl datatypes
p5-DBD-mysql-4.019p0 MySQL drivers for the Perl DBI
p5-DBI-1.616 unified perl interface for database access
p5-FreezeThaw-0.43p2 module for converting structures to strings and back
p5-MLDBM-2.04 store multi-level hash structure in single-level tied hash
p5-Net-Daemon-0.43p0 extension for portable daemons
p5-Params-Util-1.00p2 utility to make parameter checking easier
p5-PlRPC-0.2018p1 module for writing rpc servers and clients
p5-SQL-Statement-1.33 sql parsing and processing
partial-php-5.2.17p6 server-side HTML-embedded scripting language
pcre-8.13 perl-compatible regular expression library
php-5.3.8p0 server-side HTML-embedded scripting language
php-fastcgi-5.3.8p0 stand-alone FastCGI version of PHP
php-fpm-5.3.8p0 stand-alone FPM version of PHP
php-gd-5.3.8p0 image manipulation extensions for php5
php-mysql-5.3.8p0 mysql database access extensions for php5
png-1.5.5 library for manipulating PNG images
popt-1.7p1 getopt(3)-like library with a number of enhancements
samba-3.5.11p1 SMB and CIFS client and server for UNIX
t1lib-5.1.0p2 Type 1 rasterizer library for UNIX/X11
tdb-1.2.1 trivial database library
wget-1.12p1 retrieve files from the web via HTTP, HTTPS and FTP
#

关键修改地方如下
/etc/nginx/nginx.conf
user www;

fastcgi_pass unix:/tmp/nginx.socket;
SCRIPT_FILENAME /var/nginx/html$fastcgi_script_name;


/etc/php-fpm.conf

listen = /tmp/nginx.socket
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
user = www
group = www


vi /etc/rc.local
/etc/rc.d/nginx start
/etc/rc.d/php_fpm start

终于配置对了
openbsd5.1 release上面有php-fpm-5.3.10.tgzp这个文件。我的php解析不了,请问具体如何使用?关键修改地方如下
/etc/nginx/nginx.conf
user www;

fastcgi_pass unix:/tmp/nginx.socket;
SCRIPT_FILENAME /var/nginx/html$fastcgi_script_name;


/etc/php-fpm.conf

listen = /tmp/nginx.socket
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
user = www
group = www
上面的条目在openbsd5.1正式版里面没有

junfengfan
铜 Cu
帖子: 236
注册时间: 2010-02-03 18:37

回复: 有经验的 发一下 5.0当前快照版的nginx php-fpm配置

帖子 junfengfan » 2012-05-22 22:36

openbsd5.1 + nginx + php-fpm(因为packages里面有php-fpm,可以不用spawn-fastcgi) 安装后 nginx.conf 与php-fpm.conf如何配置可以解析php文件? 依照 leo兄的OpenBSD 4.8+nginx+mysql+php+vbulletin 用spawn-fastcgi可以成功解析php文件。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 1 访客