移除旧的软件包:
yum remove httpd* php*

安装:
yum install php php-fpm
yum install php-gd php-mysql php-mbstring php-xml php-mcrypt

验证配置文件:
/etc/init.d/nginx configtest

重启:
/etc/init.d/nginx restart
/etc/init.d/php-fpm restart 出现这个错误可能是路径写错了:
Access denied.
nginx php-fpm 访问.php文件出现Access denied 也可能是权限,改为nginx:
vi /etc/php-fpm.d/www.conf ; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx nginx节点配置示例:
server {
listen 80;
server_name domain;
root /wwwdir; location / {
index index.html index.htm index.php;
} #
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} }

  

centos php-fpm nginx配置的更多相关文章

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

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

  2. centos 6.9 +nginx 配置GIT HTTPS服务器(证书采用自签名)

    第一部分原通过SSH访问的GIT服务器迁移 1.把原服务器GIT资源库目录完成复制至新的服务器 2.安装GIT服务器 新的服务器 创建用户 useradd git password git 下载GIT ...

  3. 在CentOS上安装Nginx配置HTTPS并设置系统服务和开机启动(最全教程)

    友情提示:全部配完大约需要20分钟,本教程配合 xshell 和 xftp 使用更佳. 系统配置:CentOS 7.5 本教程 摘繁华 版权所有. 操作按键 常用按键: 复制操作:Shift+Ins ...

  4. CentOS 6.5 Nginx 配置

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

  5. centos下使用nginx 配置websocket,https升级wss协议

    服务端代码/***/ // 服务端代码 var express = require('express'); var app = express(); var path = require('path' ...

  6. 【CentOS 7】nginx配置web服务器

    1,安装过程 [root@VM_1_14_centos ~]# cd /data/ [root@VM_1_14_centos data]# wget http://nginx.org/download ...

  7. 一些NGINX配置

    一些nginx配置 使用独立目录, 然后include具体配置 gzip on for multi processers static file cache proxy pass 静态目录 or 文件 ...

  8. CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)

    CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL) 一.准备篇: /etc/init.d/iptables stop #关闭防火墙 关闭SELINUX vi /etc/sel ...

  9. LNMP搭建(CentOS 6.3+Nginx 1.2.0+PHP 5.3.15(fpm)+ MySQL 5.5.35)

    Nginx (“engine x”) 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器. Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 ...

  10. CentOS 6.6 nginx PHP 配置

    /************************************************************************* * CentOS 6.6 nginx PHP 配置 ...

随机推荐

  1. extjs grid 分页

    在使用extjs创建带分页功能的 grid 如下: 1.创建一个模型 // 创建算定义模型 模型名称 User Ext.define('User', { extend: 'Ext.data.Model ...

  2. Linux逻辑卷管理器(LVM)

    LVM基础 通过使用Linux的逻辑卷管理器(Logical Volume Manager, LVM),用户可以在系统运行时动态调整文件系统的大小,把数据从一块硬盘重定位到另一块硬盘,也可以提高I/O ...

  3. centos下的防火墙配置

    1,查看防火墙文件: vim /etc/sysconfig/iptables # Generated by iptables-save v1. :: *filter :INPUT ACCEPT [:] ...

  4. 【ITOO 2】使用ArrayList时的注意事项:去除多余的null值

    问题描述:在课表导入的时候,将数据从excel表里读出,然后将list批量插入到对应的课程表的数据表单中去,出现结果:当我们导入3条数据时,list.size()为3,但是实际上,list里面存在10 ...

  5. span标签之间的空隙

    出现的问题: 在html中,当有两个以及两个以上的span标签并列的时候,如果任意两个span之间换行书写的话,那么他们在页面上展现的时候往往会有空隙 解决的办法有两个: 1.将两个span标签写在同 ...

  6. kickstrat

    定制部分 硬盘分区 root密码 网络地址 公共部分 %pre% %post% tcp调优 集中配置程序(ansible) sudo配置

  7. Git:代码冲突常见解决方法

    摘自: http://blog.csdn.net/iefreer/article/details/7679631 如果系统中有一些配置文件在服务器上做了配置修改,然后后续开发又新添加一些配置项的时候, ...

  8. .net分页控件webdiyer:AspNetPager

    首先下载:AspNetPager.dll   AspNetPager.xml  放到bin目录下 页面添加<%@ Register Assembly="AspNetPager" ...

  9. Oracle sqlldr使用示例

    SQLLDR用于快速的批量导入数据, 示例步骤如下: 1.确定Oracle的连接示例 username/password@sid 我使用的是:system/world @ localorcl sid是 ...

  10. atexit注册的函数是在main函数之后执行?

    跟atexit函数相识已久,man手册里对atexit的解释是这么一段: The atexit() function registers the given function to be called ...