Chinaunix首页 | 论坛 | 博客
  • 博客访问: 312656
  • 博文数量: 103
  • 博客积分: 1590
  • 博客等级: 上尉
  • 技术积分: 1075
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-02 10:17
文章分类

全部博文(103)

文章存档

2013年(32)

2012年(7)

2010年(64)

我的朋友

分类: LINUX

2013-04-22 11:21:29


资料:


安装:
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;
    }


阅读(426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~