VPS侦探论坛

 找回密码
 注册
查看: 3519|回复: 2

网站nginx服务停止了,技术小白求助呀?

[复制链接]
发表于 2017-3-22 19:57:33 | 显示全部楼层 |阅读模式

我的VPS上搭建的一个网站应用,使用的是军哥lnmp一键安装包,刚开始两个月运行良好,中间有一次服务商强行给我换了IP,这里再鄙视下无良服务商,通知都不发下,我还以为自己的VPS被肉了。但最近发现网站打不开,一查才发现VPS上的Nginx停止运行了。技术小白一枚,不太懂那么多,有时候重启nginx即恢复,有时候会报错。

VPS运行状态:
Last login: Tue Mar 21 20:57:27 2017 from 112.26.71.143
[root@MyServer ~]# lnmp status
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
nginx is stopped
php-fpm is runing!
SUCCESS! MySQL running (1491)
[root@MyServer ~]#




VPS无法重启经常报的错:
[root@MyServer ~]# lnmp nginx start
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              http://lnmp.org              |
+-------------------------------------------+
Starting nginx... nginx: [emerg] open() "/home/wwwlogs/nginx_error.log" failed (2: No such file or directory)
failed
[root@MyServer ~]#



然后进入报错的目录就会提示无此目录:
[root@MyServer ~]# cd  /home/wwwlogs
-bash: cd: /home/wwwlogs: No such file or directory



然后进行home目录会发现该目录下是空的:
[root@MyServer ~]# cd /home
[root@MyServer home]# ls -l
total 0
[root@MyServer home]#



但是我将VPS重启后会发现一切又恢复了。包括home文件夹下的目录,

好吧,就在我刚刚重启后,可能是网络抽疯的问题 ,连不上VPS了。
有没有类似遇到类似问题的人呀,你们是怎么解决的。?





美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-23 09:02:18 | 显示全部楼层

回复 1# 的帖子



可能你/home 下的是通过挂装的,有时可能因为某些原因没挂装上
你可以df 看一下挂装情况
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-3-24 06:28:02 | 显示全部楼层

军哥,确实是这样的情况,2个盘有1个盘没挂载上,重启后又挂上了。
谢谢军哥

[root@MyServer ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_have-lv_root
                      8.5G  3.3G  4.7G  42% /
tmpfs                 245M     0  245M   0% /dev/shm
/dev/xvda1            485M   71M  389M  16% /boot




[root@MyServer ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_have-lv_root
                      8.5G  3.3G  4.7G  42% /
tmpfs                 245M     0  245M   0% /dev/shm
/dev/xvda1            485M   71M  389M  16% /boot
/dev/mapper/Xvdbgroup-xvdb1
                       20G  217M   19G   2% /home
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 12:17 , Processed in 0.025320 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表