Apache 在 digitalocean 上崩溃并自动重启

Apache 在 digitalocean 上崩溃并自动重启

我最近请求更改我的 root 密码,成功了,我可以在控制台上使用它。但是,我的 IP 地址停止工作了。访问我的域和 SSH 都响应了连接超时错误。

在我的根密码更改并且服务器重新启动之前,它一直运行良好。

我使用此命令检查了错误日志:

tail -50 /var/log/apache2/error.log

这就是我得到的:

[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 981] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020 [core:notice] [pid 970] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 990] AH00094: Command line: '/usr/sbin/apache2'

注意到了吗SIGTERM, shutting down?我认为 Apache 正在崩溃并且服务正在自动重启。

起初我以为这是由于内存使用率低造成的,然后我用这个命令进行了检查free -mh

结果如下。我的内存足够了:

              total        used        free      shared  buff/cache   available
Mem:           1.9G        259M        1.4G         612K        258M        1.6G
Swap:            0B          0B          0B

防火墙处于非活动状态,因此没有任何东西阻止端口 80

sudo ufw status
Status: Inactive

我还运行这个命令来查看正在监听的内容

sudo lsof -iTCP -sTCP:LISTEN -P

COMMAND    PID           USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd      812           root    3u  IPv4  18468      0t0  TCP  localhost:53 (LISTEN)
sshd      812           root    4u  IPv6  18468      0t0  TCP *:22 (LISTEN)
mysqld      899           mysql    29u  IPv4  19368      0t0  TCP localhost:3306 (LISTEN)
master      1089           root    13u  IPv4  19478      0t0  TCP *:25 (LISTEN)
master      1089           root    14u  IPv6  19479      0t0  TCP *:25 (LISTEN)

我可以配置我的 Apache 吗?以下是在我的/etc/apache2/ports.conf

grep "Listen" /etc/apache2/*.conf

etc/apache2/ports.conf: Listen 0.0.0.0

etc/apache2/ports.conf: Listen 433
etc/apache2/ports.conf: Listen 433

我甚至无法重新启动 apache,它不允许我

service apache2 restart

Job for apache2.service failed because the control proccess exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

运行该命令后我得到了以下信息:

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset
Drop-In: /lib/systemd/system/apache2.service.d
         apache-system.conf
Active: failed (Result: exit-code) since Mon 2020-01-20 12:16:35 UTC; 4min 9s
Process: 1616 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE

这是正常的吗?请帮忙

相关内容