/************************************************************************************************
* nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default:57
* 说明:
* VPS安装Ubuntu 16.04,调一下Nginx的PHP Server。
*
* 2017-9-26 深圳 龙华樟坑村 曾剑锋
**********************************************************************************************/ 一、参考文档:
. 启动 nginx 失败 "fastcgi_pass" directive is duplicate
http://www.cnblogs.com/cgjcgs/p/5310031.html 二、错误现象:
root@localhost:/var/www/html# systemctl status nginx.service
鈼?[0m nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue -- :: EDT; 1min 20s ago
Process: ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=/FAILURE) Sep :: localhost systemd[]: Starting A high performance web server and a reverse proxy server...
Sep :: localhost nginx[]: nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default:
Sep :: localhost nginx[]: nginx: configuration file /etc/nginx/nginx.conf test failed
Sep :: localhost systemd[]: nginx.service: Control process exited, code=exited status=
Sep :: localhost systemd[]: Failed to start A high performance web server and a reverse proxy server.
Sep :: localhost systemd[]: nginx.service: Unit entered failed state.
Sep :: localhost systemd[]: nginx.service: Failed with result 'exit-code'. 三、解决办法:
. 修改文件:/etc/nginx/sites-enabled/default
. 如下:
location ~ \.php$ {
...
# fastcgi_pass 127.0.0.1:; (此处和下面重复,注释掉)
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;(此处和上面重复)
...
}

nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default:57的更多相关文章

  1. 配置 nginx server 出现nginx: [emerg] "root" directive is duplicate in /etc/nginx/server/blogs.conf:7

    在配置nginx 虚拟机时,执行 sudo /usr/sbin/nginx -t 报下面的错误: nginx: [emerg] nginx: configuration file /etc/nginx ...

  2. 启动 nginx 失败 "fastcgi_pass" directive is duplicate

    [emerg] 4953#0: "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default: ...

  3. nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf

    解压安装过程命令如下: cd /home/oscf #该目录下有nginx压缩包 mkdir nginx tar -zxvf nginx-1.16.0.tar.gz cd nginx-1.16.0 . ...

  4. nginx:[emerg]unknown directive "ssl"

    nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:102 到解压的nginx目录 ...

  5. 阿里云centOS7.4 nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2

    里云centOS7.4配置多个站点遇到的问题nginx: [emerg] "server" directive is not allowed here in /etc/nginx/ ...

  6. 错误提示 nginx: [emerg] unknown directive "gzip_static"

    1.检查nginx配置文件错误提示如下: [root@server nginx]# /applications/nginx/sbin/nginx -t -c /applications/nginx/n ...

  7. Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"

    Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"     出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...

  8. nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx.conf:36

    nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx ...

  9. nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理

    当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload   报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...

随机推荐

  1. WordPress配置

    1.准备工作: 下载comsenzexp.exe 下载wordpress.zip 2.安装comsenzexp.exe,安装有个wwwroot目录: 3.解压wordpress.zip,然后ctrl+ ...

  2. 20145202马超 2016-2017-2 《Java程序设计》第8周学习总结

    20145202马超 2016-2017-2 <Java程序设计>第8周学习总结 教材学习内容总结 第十四章 NIO与NIO2 NIO使用频道(channel)来衔接数据节点,对数据区的标 ...

  3. netty4.1.6源码2-------创建服务端的channel

    1. netty在哪里调用jdk底层的socket去创建netty服务端的socket. 2. 在哪里accept连接. 服务端的启动: 1. 调用jdk底层的api去创建jdk的服务端的channe ...

  4. 转载:使用 OpenCV 识别 QRCode

    原文链接:http://coolshell.cn/articles/10590.html#jtss-tsina 识别二维码的项目数不胜数,每次都是开箱即用,方便得很. 这次想用 OpenCV 从零识别 ...

  5. # 20145106 《Java程序设计》第2周学习总结

    教材学习内容总结 感觉这本书的第三章和c语言有很多共同之处.因为以前学过c所以看起来并没有十分费劲.虽然以前学习过c, 但是还是忘记了long整数占8个字节这件事情.另外我第一次接触布尔这个概念.了解 ...

  6. 20135320赵瀚青LINUX第四章读书笔记

    概述 什么是进程调度 进程调度:在可运行态进程之间分配有限处理器时间资源的内核子系统. 一.调度策略 4.1进程类型 I/O消耗型进程:大部分时间用来提交I/O请求或是等待I/O请求,经常处于可运行状 ...

  7. Java基础学习笔记(一)

    Java基础学习笔记(一) Hello World 基础代码学习 代码编写基础结构 class :类,一个类即一个java代码,形成一个class文件,写于每个代码的前端(注意无大写字母) XxxYy ...

  8. STRIDE 和 DREAD

    目录 STRIDE 和 DREAD 背景 STRIDE DREAD 注释 STRIDE 和 DREAD 背景 STRIDE 和 DREAD 是最常用也是最好用的安全模型 STRIDE 主要负责对安全风 ...

  9. 【转】为什么我的DIV块前总有空隙?

    在做网站项目时,博主爱吾所爱(爱生活=爱技术)很偶然地碰到一个奇怪的事情.我的DIV嵌套在另一个DIV里,总是出现这样一行空隙: Firebug查看内外两层DIV的margin, padding, l ...

  10. xlrd基本操作

    #coding=utf-8import xlrd def read_excel(): workbook = xlrd.open_workbook('people.xlsx') sheet2 = wor ...