/*************************************************************************
* CentOS 6.6 nginx PHP 配置
* 说明:
* 在VPS上安装nginx PHP配置,以供有些时候无聊使用。
*
* 2016-11-26 深圳 南山平山村 曾剑锋
************************************************************************/ 一、参考文档:
. CentOS 6.5 yum安装配置lnmp服务器(Nginx+PHP+MySQL)
http://blog.csdn.net/lane_l/article/details/20235909
. PHP-FPM does not automatically start after reboot
http://serverfault.com/questions/459728/php-fpm-does-not-automatically-start-after-reboot
. OpenBSD.Nginx.MySQL.PHP环境搭建手册
http://www.360doc.com/content/10/1211/11/4330887_77027995.shtml 二、安装:
yum install php
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm 三、测试php-cgi:
php-cgi -b 127.0.0.1: 四、后台运行php-cgi:
. /etc/rc.d/init.d/php-fpm start
. chkconfig php-fpm on 五、nginx配置:
[root@localhost /]# cat /etc/nginx/conf.d/php.conf
server {
listen ;
server_name localhost; #charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main; location / {
root /home/zengjf/www;
index index.php index.html index.htm;
} #error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
location ~ \.php$ {
root /home/zengjf/www;
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
[root@localhost /]#

CentOS 6.6 nginx PHP 配置的更多相关文章

  1. CentOS 下 安装 nginx 执行配置命令 ./configure 报错

    CentOS 下 安装 nginx 执行配置命令 ./configure --prefix=/opt/nginx --sbin-path=/usr/bin/nginx 时提示以下错误: checkin ...

  2. CentOS 7 安装Nginx 并配置自动启动

    1.官网下载安装包 http://nginx.org/en/download.html,选择适合Linux的版本,这里选择最新的版本,下载到本地后上传到服务器或者centos下直接wget命令下载. ...

  3. Centos 6.3 nginx代理配置

    1. 查看nginx所在位置 $ nginx -t /etc/nginx/nginx.conf 2. 配置 user  nobody; #启动服务的用户 worker_processes  ; err ...

  4. Ubuntu/CentOS 系统上安装与配置Nginx

    一.在线安装: Ubuntu:sudo apt-get install nginx CentOS: sudo yum install nginx 二.安装后的位置: 1.服务地址:/etc/init. ...

  5. CentOS mini 和 nginx 的安装和配置要点

    1.安装VMware Player    版本:5.0.2 build-1031769 2.安装XShell    版本:Build 0126 3.安装CentOS    版本:6.4-x86_64- ...

  6. CentOS 7 安装 Nginx 配置反向代理

    Linux使用Nginx Yum存储库上安装Nginx,适用于Red Hat Enterprise Linux和CentOS系统. 1.添加设置Nginx Yum存储库 在CentOS中首次安装Ngi ...

  7. CentOS 8 下 nginx 服务器安装及配置笔记

    参考文档 nginx官方文档 安装 在CentOS下,nginx官方提供了安装包可以安装 首先先安装前置软件 sudo yum install yum-utils 然后将nginx官方源加入到yum源 ...

  8. CentOS 6.5 Nginx 配置

    1.安装所有 http功能: ./configure --user=www-data --group=www-data --with-http_ssl_module --with-http_reali ...

  9. 从零开始学 Java - CentOS 下 Nginx + Tomcat 配置负载均衡

    为什么现在有非常多的聪明人都在致力于互联网? 最近在读埃隆·马斯克传记,他说「我认为现在有非常多的聪明人都在致力于互联网」. 仔细一想,好像真的是这样的. 我问了自己一个问题:如果你不敲代码了,你能做 ...

随机推荐

  1. ie6 ie7 绝对定位 相对定位 层被遮住

    relative 上加上z-index有多个,则z-index递减, absolute层显示则不会被其它标签挡住.

  2. HTTP脚本化——XMLHttpRequest对象的学习笔记

    一. HTTP 请求和响应 一个HTTP请求由4部分组成 HTTP请求方法(也叫动作Verb) 正在请求的URL 一个可选的请求头集合(可能包含身份验证信息等) 一个可选的请求主体 服务器返回的HTT ...

  3. 如何用SQL返回两个日期之间的所有连续日期

    在层次查询中,Oracle引入了一个伪列level,用来表示当前行(节点)对应的level, 它从1开始计数,每多一层level的值就加1. 我们可以据此实现对两个日期/整数之间所有日期/整数的遍历. ...

  4. js——常见的小方法

    1.随机得到是六位数,可以当做“密码”来使用: Math.random().toString().substr(2, 6):

  5. Android WebView的使用

    WebView是View的一个子类,使用它可以在App中嵌入H5页面,可以跟js互相调用. webview有两个方法:setWebChromeClient和setWebClient setWebCli ...

  6. tds 安装找不到已安装的DB2

    应该是没有安装ksh的问题,yum install ksh

  7. 解决extjs grid 不随窗口大小自适应的问题

    解决extjs grid 不随窗口大小自适应的问题 August 30, 2010 zhai Javascript 8,403 viewsGo to comment 最近遇到的问题,在使用grid的时 ...

  8. shell学习记录002-知识点储备

    1.echo "4*0.33" |bc    #计算机功能的运用 [root@oc3408554812 shell]# ss=22; [root@oc3408554812 shel ...

  9. Union all的用法实例sql

    ---Union all的用法实例sqlSELECT TOP (100) PERCENT ID, bid_user_id, UserName, amount, createtime, borrowTy ...

  10. UIView 翻转动画

    [_mapView removeFromSuperview]; [self addSubview:_tableView]; //应将self.view设置为翻转对象 [UIView transitio ...