无法重新启动 apache2

无法重新启动 apache2

当我想让我的 apache2 使用 https 时,我使用这个命令:

sudo a2enmod ssl

并且我想重新启动 apache2 我使用:

sudo 服务 apache2 重启

但是我得到了这个错误:

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

我用

systemctl 状态 apache2.service

我有:

apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Thu 2021-01-21 09:12:12 CST; 1min 0s ago
  Process: 3861 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Jan 21 09:12:11 ubuntu systemd[1]: Starting The Apache HTTP Server...
Jan 21 09:37:13 ubuntu apachectl[4439]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/ssl.load: Cannot load /usr/lib/apache2/modules/mod_ssl.so into server: /usr/local/lib/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/apache2/modules/mod_ssl.so)
Jan 21 09:12:12 ubuntu apachectl[3861]: Action 'start' failed.
Jan 21 09:12:12 ubuntu apachectl[3861]: The Apache error log may have more information.
Jan 21 09:12:12 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 21 09:12:12 ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 21 09:12:12 ubuntu systemd[1]: Failed to start The Apache HTTP Server.

而/etc/apache2/apache2.conf第146行是:

IncludeOptional mods-enabled/*.load

/etc/apache2/mods-enabled/ssl.load第2行内容为:

LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

我不明白发生了什么,有人可以帮助我吗?

相关内容