/************************************************************************************************
* 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. php生成二维码的几种方式

    一些php生成二维码的方式:1.google开放api:2.php类库PHP QR Code:3.libqrencode:4.QRcode Perl CGI & PHP scripts 1.g ...

  2. 4.12 Routing -- Preventing And Retrying Transitions

    一.概述 在一个路由的跳转过程中,Ember路由器传递一个跳转对象到被跳转调用的路由的不同的hooks中.任何一个hook获取这个跳转对象,有能力通过调用transition.abort()终止跳转, ...

  3. C# 多线程编程第一步——理解多线程

    一.进程.线程及多线程的概念 什么是多线程呢?不理解. 那什么是线程呢?说到线程就不得不说说进程.我在网上搜索也搜索了一些资料,大部分所说的进程其实是很抽象的东西.通俗的来讲,进程就是一个应用程序开始 ...

  4. 通过Python来操作kylin

    起因: 老大要求的数据,无法通过kylin里面的SQL查询到,只能通过调用接口来实现需求 第一步,安装依赖的包(py2/py3都支持,我这边用的是py2) pip install kylinpy pi ...

  5. python webdriver 测试框架-数据驱动json文件驱动的方式

    数据驱动json文件的方式 test_data_list.json: [ "邓肯||蒂姆", "乔丹||迈克尔", "库里||斯蒂芬", & ...

  6. Python面试题目之打乱打乱有序列表

    # 要求打乱一个有序列表 # 待处理列表 L1 = [11,22,33,44,55,66,77,] 方法: # 引入random模块,该模块的shuffle方法见下图 import random L1 ...

  7. Python3.x:os.chdir(改变当前路径方法)介绍

    Python3.x:os.chdir(改变当前路径方法)介绍 1,os.chdir() import os os.chdir(r'C:\python36\test_chdir') 说明:chdir() ...

  8. A8几种内存

    1.SD卡(程序可写入,当成最次硬盘来用) 2.nandflash(程序可写入,当成一般硬盘来用) 3.DDR2(当A8板子的内存条来用)

  9. git clone时,提示warning: remote HEAD refers to nonexistent ref, unable to checkout

    一.环境 发行版:Ubuntu 18.04.1 LTS 代号:bionic 内核版本:4.15.0-30-generic 二.背景 git clone https://source.codeauror ...

  10. github上fork别人的代码之后,如何保持和原作者同步的更新

    1.从自己fork之后的版本库clone $  git clone -o chucklu https://github.com/chucklu/Hearthstone-Deck-Tracker.git ...