/************************************************************************************************
* 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. Web Services 简介

    通过使用 Web Services,您的应用程序可以向全世界发布信息,或提供某项功能.Web Services 脚本平台需支持 XML + HTTP. Web Services 简介 Web Serv ...

  2. jquery map方法使用示例

    jquery的map方法非常好用,其作用是将数组或单个对象,替换为新的内容 感觉jquery的map方法非常好用. 方法作用:将数组或单个对象,替换为新的内容.  应用实例:获取一组checkbox的 ...

  3. 数据结构顺序表Java实现

    Java实现顺序表算法:1:首先我们需要定义我们的接口,关于顺序表的一些基本的操作:顺序表中的操作都有增删改查. //List接口 public interface IList { //返回线性表的大 ...

  4. 什么是T-SQL

    T-SQL T-SQL 即 Transact-SQL,是 SQL 在 Microsoft SQL Server 上的增强版,它是用来让应用程序与 SQL Server 沟通的主要语言.T-SQL 提供 ...

  5. Win10取消开机密码方法

    1.开始菜单输入命令“netplwiz” 2.进入到用户账户页面,选择所需账户,把“要使用本计算机,用户必须输入用户名和密码”单选框取消勾选,点击应用 3.输入密码进行 这个时候会提示输入两次该账户的 ...

  6. Python3.x:open()文件操作

    Python3.x:open()文件操作 open/文件操作: #open(路径+文件名,读写模式) #读写模式:r只读,r+读写,w新建(会覆盖原有文件),a追加,b二进制文件.常用模式 f=ope ...

  7. RabbitMQ 一个demo

    Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sy ...

  8. SpringMVC 原理和流程

    请求到来时,第一个接受这个请求的前端控制器叫DispatcherServlet(这个需要在web.xml中配置),后端控制器叫Controller. 简化版流程: 1.spring mvc将所有的请求 ...

  9. HDU 6425 Rikka with Badminton(组合问题签到)题解

    题意:问你有多少种选法使得不能满足大于等于2个拍子且大于等于1个球. 思路:数学组合问题,分类讨论一下,刚开始的时候分的很乱,写的乱七八糟的...还有注意MOD,基本上有大数相乘的地方都要先MOD一下 ...

  10. 【同步时间】Linux设置时间同步

    所有节点都要确保已安装ntpd(在步骤4已安装) 1.首先选择一台服务器作为时间服务器. 假设选定为node1.sunny.cn服务器为时间服务器. 2.ntp服务器的配置 修改ntp.conf文件: ...