Can't restart Apache2

I’m sorry, but I have limited knowledge about Apache. I was able to successfully publish my website online some time ago using an Apache server and a functional SSL certificate that is supposed to expire in November 2023. However, when I tried to restart my server, I encountered these errors :

ubuntu@vps-4f83d472:/etc/ssl/app-attir-fr$ journalctl -xe
May 17 18:19:31 vps-4f83d472 sshd[2898236]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=77.83.93.138
May 17 18:19:34 vps-4f83d472 sshd[2898236]: Failed password for invalid user hts from 77.83.93.138 port 37914 ssh2
May 17 18:19:35 vps-4f83d472 sshd[2898236]: Received disconnect from 77.83.93.138 port 37914:11: Bye Bye [preauth]
May 17 18:19:35 vps-4f83d472 sshd[2898236]: Disconnected from invalid user hts 77.83.93.138 port 37914 [preauth]
May 17 18:19:41 vps-4f83d472 sshd[2898238]: Invalid user demo from 43.154.198.244 port 36122
May 17 18:19:41 vps-4f83d472 sshd[2898238]: pam_unix(sshd:auth): check pass; user unknown
May 17 18:19:41 vps-4f83d472 sshd[2898238]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.154.198.244
May 17 18:19:43 vps-4f83d472 sshd[2898238]: Failed password for invalid user demo from 43.154.198.244 port 36122 ssh2
May 17 18:19:44 vps-4f83d472 sshd[2898238]: Received disconnect from 43.154.198.244 port 36122:11: Bye Bye [preauth]
May 17 18:19:44 vps-4f83d472 sshd[2898238]: Disconnected from invalid user demo 43.154.198.244 port 36122 [preauth]
May 17 18:19:51 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=193.35.18.226 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=54321 P>
May 17 18:19:52 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=180.101.88.221 DST=51.178.31.211 LEN=908 TOS=0x00 PREC=0x00 TTL=38 ID=64761 >
May 17 18:20:03 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=45.143.200.50 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=14960 P>
May 17 18:20:21 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=45.227.253.110 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=240 ID=43646 >
May 17 18:20:22 vps-4f83d472 sshd[2898242]: Unable to negotiate with 176.111.173.191 port 44336: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hell>
May 17 18:20:25 vps-4f83d472 sshd[2898241]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=180.101.88.221  user=root
May 17 18:20:27 vps-4f83d472 sshd[2898241]: Failed password for root from 180.101.88.221 port 52453 ssh2
May 17 18:20:31 vps-4f83d472 sshd[2898241]: Failed password for root from 180.101.88.221 port 52453 ssh2
May 17 18:20:34 vps-4f83d472 sshd[2898241]: Failed password for root from 180.101.88.221 port 52453 ssh2
May 17 18:20:36 vps-4f83d472 sshd[2898241]: Received disconnect from 180.101.88.221 port 52453:11:  [preauth]
May 17 18:20:36 vps-4f83d472 sshd[2898241]: Disconnected from authenticating user root 180.101.88.221 port 52453 [preauth]
May 17 18:20:36 vps-4f83d472 sshd[2898241]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=180.101.88.221  user=root
May 17 18:20:38 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=79.124.62.78 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=15953 PR>
May 17 18:20:46 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=180.101.88.221 DST=51.178.31.211 LEN=908 TOS=0x00 PREC=0x00 TTL=38 ID=65 DF >
May 17 18:20:55 vps-4f83d472 sshd[2898246]: Invalid user snow from 43.154.198.244 port 58514
May 17 18:20:55 vps-4f83d472 sshd[2898246]: pam_unix(sshd:auth): check pass; user unknown
May 17 18:20:55 vps-4f83d472 sshd[2898246]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.154.198.244
May 17 18:20:57 vps-4f83d472 sshd[2898246]: Failed password for invalid user snow from 43.154.198.244 port 58514 ssh2
May 17 18:20:57 vps-4f83d472 sshd[2898246]: Received disconnect from 43.154.198.244 port 58514:11: Bye Bye [preauth]
May 17 18:20:57 vps-4f83d472 sshd[2898246]: Disconnected from invalid user snow 43.154.198.244 port 58514 [preauth]
May 17 18:21:03 vps-4f83d472 sshd[2898248]: Invalid user vagrant from 194.26.135.45 port 39174
May 17 18:21:03 vps-4f83d472 sshd[2898248]: pam_unix(sshd:auth): check pass; user unknown
May 17 18:21:03 vps-4f83d472 sshd[2898248]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=194.26.135.45
May 17 18:21:05 vps-4f83d472 sshd[2898248]: Failed password for invalid user vagrant from 194.26.135.45 port 39174 ssh2
May 17 18:21:05 vps-4f83d472 sshd[2898248]: Received disconnect from 194.26.135.45 port 39174:11: Client disconnecting normally [preauth]
May 17 18:21:05 vps-4f83d472 sshd[2898248]: Disconnected from invalid user vagrant 194.26.135.45 port 39174 [preauth]
May 17 18:21:05 vps-4f83d472 sshd[2898250]: Invalid user joshua from 43.155.174.134 port 49412
May 17 18:21:05 vps-4f83d472 sshd[2898250]: pam_unix(sshd:auth): check pass; user unknown
May 17 18:21:05 vps-4f83d472 sshd[2898250]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.155.174.134
May 17 18:21:07 vps-4f83d472 sshd[2898250]: Failed password for invalid user joshua from 43.155.174.134 port 49412 ssh2
May 17 18:21:07 vps-4f83d472 sshd[2898252]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=77.83.93.138  user=root
May 17 18:21:07 vps-4f83d472 sshd[2898250]: Received disconnect from 43.155.174.134 port 49412:11: Bye Bye [preauth]
May 17 18:21:07 vps-4f83d472 sshd[2898250]: Disconnected from invalid user joshua 43.155.174.134 port 49412 [preauth]
May 17 18:21:09 vps-4f83d472 sshd[2898252]: Failed password for root from 77.83.93.138 port 32996 ssh2
May 17 18:21:09 vps-4f83d472 sshd[2898252]: Received disconnect from 77.83.93.138 port 32996:11: Bye Bye [preauth]
May 17 18:21:09 vps-4f83d472 sshd[2898252]: Disconnected from authenticating user root 77.83.93.138 port 32996 [preauth]
May 17 18:21:13 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=180.101.88.221 DST=51.178.31.211 LEN=908 TOS=0x00 PREC=0x00 TTL=38 ID=30066 >
May 17 18:21:17 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=59.46.112.131 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=230 ID=9516 PR>
May 17 18:21:19 vps-4f83d472 kernel: [UFW BLOCK] IN=ens3 OUT= MAC=fa:16:3e:e8:5c:2c:76:bc:1b:c5:1a:53:08:00 SRC=103.178.248.179 DST=51.178.31.211 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=54321>

What I understand is that the password for the SSL certificate or key is incorrect. The problem is that I don’t know the password. I tried generating a new password and updating it in my .conf file, but it didn’t solve the issue.

[Wed May 17 16:51:20.539113 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] AH02580: Init: Pass phrase incorrect for key www.app.attir.fr:443:0
[Wed May 17 16:51:20.539974 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Wed May 17 16:51:20.539996 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error
[Wed May 17 16:51:20.540008 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Wed May 17 16:51:20.540021 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=RSAPrivateKey)
[Wed May 17 16:51:20.540034 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:04093004:rsa routines:old_rsa_priv_decode:RSA lib
[Wed May 17 16:51:20.540045 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Wed May 17 16:51:20.540056 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
[Wed May 17 16:51:20.540096 2023] [ssl:emerg] [pid 2896377:tid 140512685857856] AH02564: Failed to configure encrypted (?) private key www.app.attir.fr:443:0, check /etc/ssl/app-attir-fr/server.key

You can already check if you private key is protected by a passphrase:

and if you don’t want it, you can remove it or you need to provide a passphrase at every startup.