为了备份数据 手动停止了服务器的nginx 结果启动时报错

nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

错误的原因就是配置文件无法找到

解决办法

使用nginx -c 来指定配置文件的地址

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf  

前面为nginx目录 -c 后为配置的目录

指定配置文件之后 重启即可

nginx -s reload

nginx停止后再启动出现: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误的解决方法的更多相关文章

  1. f-stack中nginx配置后make出现error: ignoring return value of ‘ftruncate’

    问题 Nginx 配置后 make 出现error: src/os/unix/ngx_process_cycle.c: In function 'ngx_start_worker_processes' ...

  2. Nginx系列(6)- nginx: [error] CreateFile() "D:\nginx-1.20.1/logs/nginx.pid" failed (2: The system cannot find the file specified)

    背景 修改nginx配置文件nginx.conf后,想要重启nginx使配置生效.cmd进入nginx安装目录,输入命令: nginx -s reload 报错:nginx: [error] Crea ...

  3. nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

    nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) ...

  4. nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”

    在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in " ...

  5. nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37

    一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requ ...

  6. MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法

    MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法 分类: javaweb2013-06-03 14:4 ...

  7. Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解决方法

    ref from: Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解决方法http://blog ...

  8. ERROR! The server quit without updating PID file (/usr/local/var/mysql/bogon.pid).

    本文转载自http://www.jb51.net/article/48625.htm 今天网站web页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写不进去!第一反应,重启mys ...

  9. Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_6_centos.pid)

    刚接触MySql数据库,参考一些文章后搭建起来了也创建了数据库,程序跑到很好,一觉醒来突然连接不上了 MySql数据库了. 研究了好一会才找到原因. 现象: 登录数据库失败 [root@VM_0_6_ ...

随机推荐

  1. es6基础系列五--数组的拓展

    Array.from() 用于将两类对象转为真正的数组,类似数组对象和可遍历对象(包括数据结构Set和Map)转化为数组 格式:Array.from(arrayLike[, mapFn[, thisA ...

  2. js常用知识点汇总

    1.json字符串与json对象相互转化(转至:http://www.jb51.net/article/43136.htm) SON字符串: var str1 = '{ "name" ...

  3. const指针与指向const的指针

    当使用带有const的指针时其实有两种意思.一种指的是你不能修改指针本身的内容,另一种指的是你不能修改指针指向的内容.听起来有点混淆一会放个例子上来就明白了.       先说指向const的指针,它 ...

  4. 谈谈Java异常处理这件事儿

    此文已由作者谢蕾授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 前言 我们对于"异常处理"这个词并不陌生,众多框架和库在异常处理方面都提供了便利,但是对于 ...

  5. http://lorempixel.com/ 可以快速产生假图

    http://lorempixel.com/可以快速产生假图

  6. X-Content-Type-Options和 X-XSS-Protection

    X-Content-Type-Options 互联网上的资源有各种类型,通常浏览器会根据响应头的Content-Type字段来分辨它们的类型.例如:"text/html"代表htm ...

  7. Pipenv: Python包管理神器

    Pipenv旨在将最好的包管理机制(bundler, composer, npm, cargo, yarn等等)带到Python中去. 它会为你的项目自动创建和管理virtualenv,也会在安装和移 ...

  8. Go入门基础手记

    1. 配置环境变量(临时) export GOPATH=yourpath 2. 跨平台交叉编译 env GOOS=linux GOARCH=amd64 go build 3. test写法 // 首先 ...

  9. Jenkins +Maven+Tomcat+SVN +Apache项目持续集成构建

    详解Jenkins +Maven+Tomcat+SVN +Apache项目持续集成 一:前言 1. Jenkins jenkins版本大全http://mirrors.jenkins-ci.org/ ...

  10. web.xml中监听器如何顺序加载

    最近用到在Tomcat服务器启动时自动加载数据到缓存,这就需要创建一个自定义的缓存监听器并实现ServletContextListener接口, 并且在此自定义监听器中需要用到Spring的依赖注入功 ...