location ~ \.php(.*)$ {
root /mnt/www/wenyin;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; ---->/scripts修改为$document_root为解决nginx无法运行php-cgi的问题
include fastcgi_params;
}

在重新启动nginx时报socket错误请首先检查默认端口端口问题

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)


 listen       80;
 #listen       80 default_server;

 #listen       [::]:80 default_server;

nginx配置腾讯云ssl证书实例

server {
listen 443 ssl;
#listen 443 ssl http2 default_server;
#listen [::]:443 ssl;
server_name www.zyin8.com;
root /mnt/www/wenyin; ssl_certificate /etc/nginx/conf.d/cert/2_www.zyin8.com.crt;
ssl_certificate_key /etc/nginx/conf.d/cert/3_www.zyin8.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_timeout 10m;
#ssl_ciphers HIGH:!aNULL:!MD5;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on; # Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf; location / {
index index.html index.php index.htm;
}

location ~ \.php(.*)$ {

root /mnt/www/wenyin;
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
      }

    error_page 404 /404.html;

location = /40x.html {
      }


error_page 500 502 503 504 /50x.html;

location = /50x.html {
      }
}

 

centos6.8配置php-fpm(php已在apache中以模块形式运行,nginx中同时以fastcgi运行)的更多相关文章

  1. php环境配置中各个模块在网站建设中的功能

    上一篇配置环境的时候,我们注意到,有四个模块需要配置,那么,这四个模块分别有哪些功能呢?   一.php php是我们的用来创建动态网页的强有力的脚本语言,安装过程中我们直接解压到某一个路径就好了,比 ...

  2. CentOS6编译LAMP基于FPM模式的应用wordpress

    CentOS6编译LAMP基于FPM模式的应用wordpress 引言:其实我们可以直接使用yum安装LAMP(Linux+Apache[httpd]+Mysql+PHP),比手动编译安装LAMP要简 ...

  3. centos6 安装配置ss笔记

    2018-05-17 centos6 安装配置ss笔记 操作环境:Centos 6 x86_64 bbr 服务器地址:美国 1.准备VPS 在https://www.bwh1.net可购买,购买时已默 ...

  4. 在CentOS6上配置MHA过程全记录

    在CentOS6上配置MHA过程全记录 MHA(Master High Availability)是一款开源的MariaDB or MySQL高可用程序,为MariaDB or MySQL主从复制架构 ...

  5. centos6 网卡配置,多IP设置

    ##云服务器 centos6网卡配置 #设置出口IP vim /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=seth0 #网卡名称 BOOTPROTO ...

  6. VirtualBox安装复制Centos6.6配置网络

    由于要搭建mongodb的集群,先用虚拟机做下相关实验,以前都用VM Vare,但是现在这个电脑的配置不是太好,VM Vare比较耗资源,所以选择VirtualBox. 1.下载VirtualBox和 ...

  7. CentOS6.5配置 cron

    CentOS6.5配置 cron 任务 - mengjiaoduan的博客 - CSDN博客https://blog.csdn.net/mengjiaoduan/article/details/649 ...

  8. Centos6.7配置Nginx+Tomcat简单整合

    系统环境:Centos 6.7 软件环境:JDK-1.8.0_65.Nginx-1.10.3.Tomcat-8.5.8 文档环境:/opt/app/ 存放软件目录,至于mkdir创建文件就不用再说了 ...

  9. CentOS6.4 配置Tengine(转)

    CentOS6.4 配置Tengine   1.安装Nginx所需的pcre-devel库 yum install -y gcc gcc-c++ wget ftp://ftp.csx.cam.ac.u ...

随机推荐

  1. python 变量 if

    #########################总结###################### 1. 初识python python是一门弱类型的解释型高级编程语言 解释器: CPython 官方 ...

  2. Linux记录-salt命令

    salt '*id*'  test.ping salt -N  组名  cmd.run '' salt -G "ipv4:0.0.0.0"  cmd.run '' salt '*i ...

  3. 【解决】Can't find default configuration "arch/x86/configs/xx_defconfig"!

    Can't find default configuration "arch/x86/configs/xx_defconfig"! 这个问题常见在没有设置好架构的makefile中 ...

  4. 【leetcode-69】 x 的平方根

    (主要是越界问题) 实现 int sqrt(int x) 函数. 计算并返回 x 的平方根,其中 x 是非负整数. 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去. 示例 1: 输入: 4 ...

  5. Spark RDD基本概念与基本用法

    1. 什么是RDD RDD(Resilient Distributed Dataset)叫做分布式数据集,是Spark中最基本的数据抽象,它代表一个不可变.可分区.里面的元素可并行计算的集合.RDD具 ...

  6. Structured Streaming + Kafka Integration Guide 结构化流+Kafka集成指南 (Kafka broker version 0.10.0 or higher)

    用于Kafka 0.10的结构化流集成从Kafka读取数据并将数据写入到Kafka. 1. Linking 对于使用SBT/Maven项目定义的Scala/Java应用程序,用以下工件artifact ...

  7. 解析ArcGis的标注(一)——先看看分数式、假分数式标注是怎样实现的

    该“标注”系列博文的标注引擎使用“标准标注引擎(standard label engine)”,这个概念如不知道,可不理会,ArcGis默认标注引擎就是它. ArcGis的标注表达式支持VBScrip ...

  8. Python正则匹配之有名分组

    参考:http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html # re.match import re m = re.match(r'( ...

  9. Windows Server 2008 R2中无法使用360免费Wifi的解决方案

    为了使主机和虚拟机在同一个无线网络中,而虚拟机的系统是Windows Server 2008 R2 64位的,使用360免费wifi,始终无法开启.在网上查找解决方案,终于找到了原因:Windows ...

  10. 搭建 consul 集群

    =============================consul 命令行工具=============================consul 支持 Windows/Linux 等多种平台, ...