nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default:57
/************************************************************************************************
* 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的更多相关文章
- 配置 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 ...
- 启动 nginx 失败 "fastcgi_pass" directive is duplicate
[emerg] 4953#0: "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default: ...
- 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 . ...
- nginx:[emerg]unknown directive "ssl"
nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:102 到解压的nginx目录 ...
- 阿里云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/ ...
- 错误提示 nginx: [emerg] unknown directive "gzip_static"
1.检查nginx配置文件错误提示如下: [root@server nginx]# /applications/nginx/sbin/nginx -t -c /applications/nginx/n ...
- Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl"
Nginx配置SSL报错 nginx: [emerg] unknown directive "ssl" 出现如图所示错误,处理办法如下 去nginx解压目录下执行 ./co ...
- 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 ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理
当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload 报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/l ...
随机推荐
- Cannot find entry file index.android.js in any of the roots:[ Android ]
Changed the version of react project to a lower one from here npm install -g rninit rninit init [Pro ...
- Excel error 64-bit version of SSIS
问题是 在windows server 2008 64位的计划任务执行 ssis 的错误 ,ssis你们带有读取excel 日期 2015/3/17 11:50:34日志 作业历史记录 (SSIS_U ...
- Learn2Rank
Learning to rank 排序学习是推荐.搜索.广告的核心方法.排序结果的好坏很大程度影响用户体验.广告收入等.排序学习可以理解为机器学习中用户排序的方法,这里首先推荐一本微软亚洲研究院刘铁岩 ...
- 解决 failed to push some refs to 'git@github.com:zle1992/head-first-java' hint: Updates were rejected because the tip of your curr
问题描述: 寒假之前用实验室电脑push到github 上head first java 的程序,寒假回家后,想用自己的笔记本继续编,继续push . 我先从github下载zip到本地,然后 解压后 ...
- Adobe AIR中使用Flex连接Sqlite数据库(1)(创建数据库和表,以及同步和异步执行模式)
系列文章导航 Adobe AIR中使用Flex连接Sqlite数据库(1)(创建数据库和表) Adobe AIR中使用Flex连接Sqlite数据库(2)(添加,删除,修改以及语句参数) Adobe ...
- 【OpenCV学习笔记】三十、轮廓特征属性及应用(七)—位置关系及轮廓匹配
http://blog.csdn.net/abc8730866/article/details/69219992 轮廓特征属性及应用(七)—位置关系及轮廓匹配 1.计算点与轮廓的距离及位置关系——po ...
- SQL学习笔记三(补充-2)之MySQL数据类型
阅读目录 一 介绍 二 数值类型 三 日期类型 四 字符串类型 五 枚举类型与集合类型 一 介绍 存储引擎决定了表的类型,而表内存放的数据也要有不同的类型,每种数据类型都有自己的宽度,但宽度是可选的 ...
- git-format-patch如何指定补丁生成的Subject格式
答:使用-N来指定,如: git format-patch -N <commit-id> 生成的补丁中Subject将以[PATCH]的格式呈现,例如:Subject: [PATCH] a ...
- POJ 2528 Mayor's posters(线段树染色问题+离散化)
http://poj.org/problem?id=2528 题意: 给出一面无限长的墙,现在往墙上依次贴海报,问最后还能看见多少张海报. 题意:这道题目就相当于对x轴染色,然后计算出最后还能看见多少 ...
- pycharm同时使用python2.7版本和python3.6版本
最近在看爬虫的专题,很多爬虫的教程是python2的,电脑上装的是3.6版本,而且python不向下兼容,这就很麻烦,最简单的print要加括号啊,等等.于是分享一个在windows环境下pychar ...