1.复制相应的文件
cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf

2.打开Nginx配置文件
vim /usr/local/nginx/conf/nginx.conf

取消注释 更改如下
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
include fastcgi_params;
}

3.启动php-fpm和Nginx
/usr/local/php7/sbin/php-fpm
/usr/local/nginx/sbin/nginx -s reload

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

  1. Centos7 配置网络步奏详解

    Centos7 配置网络步奏详解 编辑网卡配置文件 vi /etc/sysconfig/network-script/ifcfg-ens01 备注:这里的ens01不是所有系统都叫这个,有的可能叫其他 ...

  2. centos7配置开启无线网卡,重启防火墙

    centos7配置无线网卡: 在虚拟机为nat的网络连接下(就是默认的那个),centos7默认网卡未激活. 可以设置 文件 /etc/sysconfig/network-scripts/ifcfg- ...

  3. Centos7配置JAVA_HOME

    Centos7配置JAVA_HOME http://blog.csdn.net/zzpzheng/article/details/73613838 在Centos7上,通过yum install ja ...

  4. Centos7配置NFS

    centos7配置nfs yum -y install nfs-utils rpcbind 设置服务开机启动: systemctl enable rpcbind systemctl enable nf ...

  5. Centos7 配置ssh连接

    Centos7 配置ssh连接 1.检查是否安装openssh-server:#yum list installed | grep openssh-server 安装openssh-server:#y ...

  6. CentOS7 配置静态 ip

    1. 为 CentOS7 配置静态 ip 1.1 修改文件/etc/sysconfig/network-scripts/ifcfg-ens33 sudo vi /etc/sysconfig/netwo ...

  7. virtualbox 最小化安装centos7 配置双网卡(nat和桥接)记录----已经过期

    该文章已经过期   请参考另一篇文章:virtualbox 安装centos7 配置桥接网卡,实现主机和虚拟机互通,虚拟机可以访问外网,解决无法上网问题   先说明一下为什么要配置双网卡? 配置nat ...

  8. Centos7配置samba

    Centos7配置samba 1.安装 yum install samba samba-client samba-common -y 2.配置 备份已有配置mv /etc/samba/smb.conf ...

  9. CentOS7配置中文

    CentOS7配置中文 yum install kde-l10n-Chinese -y vim /etc/locale.conf修改为zh_CN.UTF-8 vim /etc/environment添 ...

  10. Centos7配置外部网络访问

    Centos7配置外部网络访问 一.安装步骤中的重要配置: 默认是动态ip配置,有需要可以改成静配置 BOOTPROTO="static" 二.如果不能联网,按照如下步骤设置网络: ...

随机推荐

  1. Elasticsearch 5.6.5 安装head插件

    head安装包,下载地址:https://github.com/mobz/elasticsearch-head/archive/master.zip head 插件不能放在elasticsearch- ...

  2. Using Lucene's new QueryParser framework in Solr

    Sometime back, I described how I built (among other things) a custom Solr QParser plugin to handle P ...

  3. 安装Python-Windows

    安装Python-Windows 在开始Python编程前,需要先安装Python环境.Python安装包可以到Python的官网下载,官网地址是https://www.python.org/,如果想 ...

  4. Java如何实现按指定行读取文件

    最近在开发实战中,遇到了一个这样的技术情景: 把log4j生成的日志文件定时刷进MySQL数据库,比如三个小时刷一次,那么每次刷数据的时候,如何控制文件读取是从上一次文件读取结束的地方开始继续读取的? ...

  5. C# 根据实体类的属性动态生成字符串

    情景: 目前有两个实体类:Student,ClassInfo. public class Student { public string Name { get; set; } public strin ...

  6. 从FastDFS官网下载我们需要的安装包

    第一步:大家在浏览器地址栏输入:https://sourceforge.net/projects/fastdfs/files,我们会看到如下图所示界面. 第二步:下载FastDFS的Server安装包 ...

  7. python index()函数

    python内置index()函数 index() 方法检测字符串中是否包含子字符串 str ,如果指定 beg(开始) 和 end(结束) 范围,则检查是否包含在指定范围内,该方法与 python ...

  8. django admin的自定制

    from django.contrib import admin # Register your models here. from .models import * from django.util ...

  9. SQL语句insert into 不存在则插入,存在则修改

    一 测试表的创建 -- ---------------------------- -- Table structure for User -- ---------------------------- ...

  10. 2019 HEOI游记(真-退役记)

    \(\color{#00ffff}{DAY \ \ -1}\) 下午又在说无聊的注意事项,有点紧张,不想做题,只想水题233333 晚上就水了几道网络流,晚四透彻依旧,yhzr二连胜,心里倒是放松了不 ...