/************************************************************************************************
* 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;(此处和上面重复)
...
}

最新文章

  1. python多行字符串
  2. C# TCP socket发送大数据包时,接收端和发送端数据不一致 服务端接收Receive不完全
  3. [OSG][osgEarth]osgEarth例子程序简介
  4. 查看最点CPU的语句
  5. 走进AngularJs(七) 过滤器(filter)
  6. Dynamo和Bigtable对比
  7. linux命令学习(1)
  8. Linux 内存机制详解宝典
  9. Windows 无法启动xx服务 错误1053:服务没有及时响应启动或控制请求
  10. golang的linux安装
  11. Model Representation and Cost Function
  12. p67交换幺环为整环的充要条件
  13. 前端里面如何进行搜索引擎优化(SEO)
  14. matlab将矩阵数据归一化到[0,255]
  15. python中 os._exit() 和 sys.exit(), exit(0)和exit(1) 的用法和区别
  16. 前端关于列表的基础 day47
  17. 苹果手机不兼容autoplay属性
  18. iOS知识基础篇 static
  19. 常用社交网络(微博等)动态新闻(feed、新鲜事)系统浅析(转)
  20. atom / vscode (配置c++环境流程)

热门文章

  1. 为什么要同时重写equals和hashcode
  2. (17)ClippingNode的使用
  3. 001-mybatis框架
  4. 获取WebView加载的网页内容并进行动态修改
  5. HDU4642
  6. SQL学习笔记四之MySQL数据操作
  7. Rabbitmq安装、集群与高可用配置
  8. NOIP2016 T4 魔法阵 暴力枚举+前缀和后缀和优化
  9. fiddler几种功能强大的用法(二)
  10. Mininet实验 自定义拓扑结构