重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之 后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件

[root@localhost sbin]# ./nginx -s reload

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

解决方法:

[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

使用nginx -c的参数指定nginx.conf文件的位置

[root@localhost nginx]# cd logs/

[root@localhost logs]# ll

总用量 12

-rw-r--r-- 1 root root 1246 12月  9 18:10 access.log

-rw-r--r-- 1 root root  516 12月 10 15:39 error.log

-rw-r--r-- 1 root root    5 12月 10 15:38 nginx.pid

看nginx.pid文件已经有了。

解决nginx [error] open() "usr/local/nginx/logs/nginx.pid" failed错误的更多相关文章

  1. 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 ...

  2. 解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

    重新启动服务器,访问web服务发现无法浏览,登陆服务器之 后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr ...

  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启动或者重启失败,报错nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

    第一种方案: 1. 执行命令 :open /usr/local/etc/nginx 打开nginx安装目录 nginx安装目录默认位置有:(找到适合你的) /etc/nginx/nginx.conf, ...

  6. Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 错误解决方法

    /etc/init.d/mysql start无法启动MySQL错误信息如下: ERROR! MySQL server PID file could not be found! Starting My ...

  7. 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_ ...

  8. touch: cannot touch '/usr/local/tomcat/logs/catalina.out': Permission denied解决方法

    一.报以下错误: ./startup.sh Using CATALINA_BASE: /usr/local/tomcat702 Using CATALINA_HOME: /usr/local/tomc ...

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

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

  10. 系统盘的消耗 谨慎的日志存储到系统盘+日志级别!! 569 error_log = /usr/local/php7/logs/php-error.log 26 error_log = /usr/local/php7/logs/fpm_error_log

    案例: 系统盘一夜之间骤增近20G nginx + php-fpm cat  /usr/local/nginx/conf/nginx.conf 查看对请求的处理 4个配置文件 /usr/local/n ...

随机推荐

  1. 织梦dedecmsV5.7联动类型无法显示的处理方法

    最近织梦dedecms在新的功能中添加了一个联动类型这样的一个功能.所谓的联动类型,类似于一级目录下有二级目录,二级目录下又有三级目录,可以理解为数据结构中树形结构.级和级之间都是有着联系的.为了让大 ...

  2. java中的左右移

    package scanner; public class LeftMove { public static void main(String[] args) { int i = 1; System. ...

  3. oracle查看表空间下数据文件

    下面两个数据字典视图就知道了.查看有哪些表空间:select * from dba_tablespaces;查看有哪些数据文件在哪个表空间中:select * from dba_data_files; ...

  4. eclipse代码编辑区字符串自动转义设置

    在做接口测试时,有时接口请求参数非常多,如果用java相关方法去拼接参数,难度较大,并且非常浪费时间,那如何快速将整个请求参数拼接成一个字符串呢?为了解决这个问题,只要简单配置下eclipse设置即可 ...

  5. 使用axios post 提交数据,后台获取不到提交的数据解决方案

    一.问题发现 前后端分离使用vue开发,结合axios进行前后端交互数据,一开始使用 get 请求,获取数据,没有发现任何问题,当使用 post请求 传参时,发现,数据明明已经提交,在打开F12 开发 ...

  6. fhs文件系统层级结构

    文件系统:操作系统用于明确存储设备或分区上的文件的方法和数据结构:层次化管理文件的结构就是文件系统: linux层次化文件结构,倒树状结构文件结构        FHS  filesystem hie ...

  7. 解决span的bug--不能自动换行的问题

    span标签元素不能自动换行,在超出父盒子的宽度后不能够自动换行 如下界面: 解决办法:将span属性加上display:block设置为行级元素:设置宽度然后在强制断行 效果如下:

  8. android 软键盘的使用

    AndroidManifest.xml文件中界面对应的<activity>里加入android:windowSoftInputMode="adjustPan"   键盘 ...

  9. OkHttp自定义重试次数

    本文主要应用了OkHttp的Interceptor来实现自定义重试次数 虽然OkHttp自带retryOnConnectionFailure(true)方法可以实现重试,但是不支持自定义重试次数,所以 ...

  10. [译] Linux吃掉了我的内存

    英文原文: https://www.linuxatemyram.com/ 作者: Vidar Holen 译者: thinkam 发生了什么? Linux正借用你未使用的内存来做磁盘缓存.这使你的计算 ...