命令:nginx -t

查看失败原因:

nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/default:61

nginx: configuration file /etc/nginx/nginx.conf test failed

然后找到这样的原因的解决的方法

cd /etc/nginx/site-enabaled/default

With php5-cgi alone或者with php5-fpm

不要俩个都用就能够了。

于是凝视掉fastcgi_pass 这一行

service nginx restart 就ok了。这应该是上次微信php配置的时候遗留下来的问题。

linux nginx service nginx restart [fail]的更多相关文章

  1. [ubuntu] service apache2 restart [fail]

    $ /etc/init.d/apache2 restart * Restarting web server apache2 [fail] 解决办法4步走: 1. sudo /etc/init.d/ap ...

  2. linux安装部署Nginx

    两个参考地址: NGINX的百度百科:https://baike.baidu.com/item/nginx/3817705?fr=aladdin NGINX的中文网站:http://www.nginx ...

  3. linux安装php nginx mysql

    linux装软件方式: systemctl status firewalld.service 查看防火墙systemctl stop firewalld.service systemctl disab ...

  4. Linux下设置Nginx开机自启

    1.本地环境 [root@dev ~]#cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) 2.在/etc/init.d创建ngi ...

  5. 在Linux上部署Nginx,反向代理tornado的WebSite

    1.安装 Nginx yum install -y nginx 2. 修改nginx配置文件 cd /etc/nginx/ mv nginx.conf nginx.conf.swf mv nginx. ...

  6. Linux架构之Nginx Web基础1

    第41章 Nginx Web基础入门 41.1 Nginx部署 41.1.1 Nginx的安装方式   源码编译 官方仓库 epel仓库 优点 规范 安装简单 安装简单   便于管理 配置易读   缺 ...

  7. 在centos下启动nginx出现Failed to start nginx.service:unit not found

    错误的原因就是没有添加nginx服务,所以启动失败. 解决方法: 1.    在/root/etc/init.d/目录下新建文件,文件名为nginx 或者用命令在根目录下执行:# vim /etc/i ...

  8. nginx.service: control process exited, code=exited status=1

    安装linux的宝塔面板,结果面板显示nginx和php已经运行了,但是机器系统上并没有运行.记录一次nginx报错,操作步骤看下代码: [root@localhost nginx]# systemc ...

  9. nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument解决

    先附上错误信息: (myblog) root@Dapeng:/home/uwsgi# service nginx status ● nginx.service - A high performance ...

随机推荐

  1. spring boot 在idea中实现热部署

    1)在pom中直接引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifac ...

  2. docker nginx 负载均衡

    index1.html <html> <head> <title>lb-test</title> </head> <body> ...

  3. source 1.7 中不支持 lambda 表达式(请使用 -source 8 或更高版本以启用 lambda 表达式)

    from:http://blog.csdn.net/qwdafedv/article/details/54691740 https://www.youtube.com/watch?v=oXxijdf8 ...

  4. 枚举(enum)的使用

    在开发中我们经常会遇到一些特殊的字段,比如订单状态.支付状态.类型等,这些特殊字段在编码开发的时候,可以写成枚举类型.接下来还是看Demo吧! public enum AuditState { Wai ...

  5. 跟初学者学习IbatisNet第一篇

    写在前面的话:我自己也是一个初学者,写这个专题只是为了对学过知识的巩固,如果有什么不对的地方,欢迎大家指正…………………… 第一篇就简单介绍一下什么是IbatisNet,然后写一个简单的Demo,在后 ...

  6. SPOJ LCS2 多个串的最长公共子串

    这里串最多有10个,找所有串的最长公共子串 这里后缀自动机做,以第一个串建立后缀自动机,后面的串一个个去匹配,每次得到当前串在可到达状态上所能得到的最长后缀长度 拿所有串匹配后得到的结果进行计算 #i ...

  7. bzoj 1702 贪心,前缀和

    [Usaco2007 Mar]Gold Balanced Lineup 平衡的队列 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 807  Solved: ...

  8. windows环境下SVN服务器限制注释字数

    1.)打开版本库的D:\SVN版本库\otpv3\hooks, 2.)然后新建一个文件pre-commit.bat.(该目录下有模板文件:pre-commit.impl,你要是感兴趣可以详细看看). ...

  9. 从jmm模型漫谈到happens-befor原则

    首先,代码都没有用ide敲,所以不要在意格式,能看懂就行jmm内存模型: jmm是什么? jmm说白了就是定义了jvm中线程和主内存之间的抽象关系的一种模型,也就是线程之间的共享变量存储在主内存,而每 ...

  10. Codevs 3409 搬礼物

    时间限制: 1 s 空间限制: 64000 KB 题目等级 : 青铜 Bronze   题目描述 Description 小浣熊松松特别喜欢交朋友,今年松松生日,就有N个朋友给他送礼物.可是要把这些礼 ...