资料:
安装:
10.xxx.xxx.124 vim /etc/yum.conf
CentOS:
[nginx]
name=nginx repo
baseurl=
gpgcheck=0
enabled=1
[root@vm12080045 ~]# yum --enablerepo=nginx info nginx
Available Packages
Name : nginx
Arch : x86_64
Version : 1.2.8
Release : 1.el5.ngx
Size : 352 k
Repo : nginx
Summary : nginx is a high performance web server
URL :
License : 2-clause BSD-like license
Description: nginx [engine x] is an HTTP and reverse proxy server, as well as
: a mail proxy server
标签user和group用于设置运行FastCGI进程的用户和用户组。需要注意的是,这里指定的用户和用户组要和Nginx配置文件中指定的用户和用户组一致。
chown www:www /var/log/nginx/log/
chown www:www /usr/local/sinasrv2/logs
pkill -9 php-cgi
ps aux |grep fpm
/usr/local/sinasrv2/sbin/php-fpm start
/etc/init.d/nginx start
/etc/init.d/nginx stop
vim /usr/local/sinasrv2/etc/php-fpm.conf
vim /usr/local/sinasrv2/lib/php.ini
vim /etc/nginx/conf.d/default.conf
vim /etc/nginx/fastcgi_params
rpm -qc sinasrv2-php-5.2.14-15
rpm -ql nginx-1.2.8-1.el5.ngx
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
阅读(456) | 评论(0) | 转发(0) |