移除旧的软件包:
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. USACO Section 3.2 香甜的黄油 Sweet Butter

    本题是多源最短路问题 但使用弗洛伊德算法会超时 而因为边数目比较少 所以用队列优化后的迪杰斯特拉算法可以通过 #include<iostream> #include<cstring& ...

  2. Unable to load type System.Data.Entity.DynamicProxiesXXXXXrequired for deserialization.

    Memcache实例的Get方法时抛出了异常“Unable to load type System.Data.Entity.DynamicProxies.AdInfoItems_19CD09C8E46 ...

  3. Windows API——CREATEEVENT——创建事件

    事件是一个允许一个线程在某种情况发生时,唤醒另外一个线程的同步对象.事件告诉线程何时去执行某一给定的任务,从而使多个线程流平滑 CreateEvent是创建windows事件的意思,作用主要用在判断线 ...

  4. Leetcode028. Implement strStr()

    class Solution { public: int strStr(string haystack, string needle) { ; //needle empty ; //haystack ...

  5. 按照 where id in ()排序

    select * from ibs6_terminal_adv_inf where id in (16,14,15) order by find_in_set(id,'16,14,15')

  6. Validform使用

    原文链接:http://validform.rjboy.cn/document.html Validform v5.3.2 文档 Validform使用入门 绑定附加属性 初始化参数说明 Validf ...

  7. leetcode 100

    100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binar ...

  8. oracle 如何恢复误删的表记录数据

    --开启行移动功能 ALTER TABLE tablename ENABLE row movement ; --恢复表数据,时间为删除或修改的时间点 flashback table tablename ...

  9. nginx负载均衡配置一(反向代理)

    一.前提 1:系统linux(centos) 2:nginx代理服务器(web:192.168.1.10  proxy.abc.com) 3:nginx后台服务器(web1:192.168.1.11 ...

  10. c++强制类型转换(static_cast,const_cast,dynamic_cast,reinterpret_cast)

    static_cast <typeid>(exdlvssion) static_cast 很像 C 语言中的旧式类型转换.它能进行基础类型之间的转换,也能将带有可被单参调用的构造函数或用户 ...