Need Help with Apache2 and Dovecot Issues After Recovery

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.1
Virtualmin version 7.20.2
Webmin version 2.202
Usermin version 2.102

I have a problem where Apache2 stopped working, and after fixing it, three of my websites no longer open. When entering the IP address, it shows a page indicating that Apache is running correctly.

The second problem is with the Dovecot IMAP/POP3 Server, which is currently not working. Out of three websites, one is working while the other two are down, and I’m not sure how to fix them

error.log
[Fri Dec 06 13:02:52.551915 2024] [mpm_event:notice] [pid 449613:tid 124489742493568] AH00489: Apache/2.4.58 (Ubuntu) configured – resuming normal operations
[Fri Dec 06 13:02:52.552240 2024] [core:notice] [pid 449613:tid 124489742493568] AH00094: Command line: ‘/usr/sbin/apache2’

mail.err

2024-12-06T16:09:11.750826+00:00 hy76 postfix/smtpd[499244]: fatal: no SASL authentication mechanisms
2024-12-06T16:17:58.261134+00:00 hy76 postfix/smtpd[500414]: fatal: no SASL authentication mechanisms
2024-12-06T17:00:53.988685+00:00 hy76 postfix/smtpd[509851]: fatal: no SASL authentication mechanisms

hy76_error_log on
[Sat Nov 30 15:13:01.771460 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_util_ssl.c(451): AH02412: [hy76:443] Cert matches for name ‘hy76’ [subject: CN=hy76 / issuer: CN=R10,O=Let’s Encrypt,C=US / serial: 03A3B67A15511CDA21150ACD6D2917C1D9CD / notbefore: Oct 2 11:15:54 2024 GMT / notafter: Dec 31 11:15:53 2024 GMT]
[Sat Nov 30 15:13:01.771497 2024] [ssl:info] [pid 1343:tid 132362641299328] AH02568: Certificate and private key hy76:443:0 configured from /etc/ssl/virtualmin/172120963577612/ssl.cert and /etc/ssl/virtualmin/172120963577612/ssl.key

hy77_error_log off
[Sat Nov 30 15:13:01.771818 2024] [ssl:info] [pid 1343:tid 132362641299328] AH01914: Configuring server hy77:443 for SSL protocol
[Sat Nov 30 15:13:01.773400 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(526): AH01893: Configuring TLS extension handling
[Sat Nov 30 15:13:01.776149 2024] [ssl:emerg] [pid 1343:tid 132362641299328] AH02565: Certificate and private key hy77:443:0 from /etc/ssl/virtualmin/171959300876691/ssl.combined and /etc/ssl/virtualmin/171959300876691/ssl.key do not match

[Sat Nov 30 13:41:09.544048 2024] [ssl:debug] [pid 1356:tid 135204331136896] ssl_util_ssl.c(451): AH02412: [hy78:443] Cert matches for name ‘hy78’ [subject: CN=hy78 / issuer: CN=R11,O=Let’s Encrypt,C=US / serial: 03FBB25F240171049EC04398C79ABD9B4643 / notbefore: Nov 10 14:55:52 2024 GMT / notafter: Feb 8 14:55:51 2025 GMT]
[Sat Nov 30 13:41:09.544086 2024] [ssl:info] [pid 1356:tid 135204331136896] AH02568: Certificate and private key hy78:443:0 configured from /etc/ssl/virtualmin/172330762125204/ssl.cert and /etc/ssl/virtualmin/172330762125204/ssl.key
[Sat Nov 30 15:13:01.510185 2024] [ssl:info] [pid 1343:tid 132362641299328] AH01914: Configuring server hy78:443 for SSL protocol
[Sat Nov 30 15:13:01.534567 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(2220): AH02209: CA certificate: CN=R11,O=Let’s Encrypt,C=US
[Sat Nov 30 15:13:01.534711 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(526): AH01893: Configuring TLS extension handling
[Sat Nov 30 15:13:01.542737 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_util_ssl.c(451): AH02412: [hy78:443] Cert matches for name ‘hy78’ [subject: CN=hy78 / issuer: CN=R11,O=Let’s Encrypt,C=US / serial: 03FBB25F240171049EC04398C79ABD9B4643 / notbefore: Nov 10 14:55:52 2024 GMT / notafter: Feb 8 14:55:51 2025 GMT]
[Sat Nov 30 15:13:01.542775 2024] [ssl:info] [pid 1343:tid 132362641299328] AH02568: Certificate and private key hy78:443:0 configured from /etc/ssl/virtualmin/172330762125204/ssl.cert and /etc/ssl/virtualmin/172330762125204/ssl.key

sudo systemctl status dovecot
× dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-12-06 16:26:08 UTC; 45min ago
Docs: man:dovecot(1)
https://doc.dovecot.org/
Process: 502681 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
Main PID: 502681 (code=exited, status=89)
CPU: 36ms

sudo systemctl restart dovecot
Job for dovecot.service failed because the control process exited with error code.
See “systemctl status dovecot.service” and “journalctl -xeu dovecot.service” for details.

No second problem. Start a new topic for new problems. I’m already confused.

https://forum.virtualmin.com/guidelines

1 Like

You’ve got to be more specific. What actually happens? What’s in the error log for the domains when you try to open them?

1 Like

have 3 site its off all Apache2 its on error is

hy76_error_log on
[Sat Nov 30 15:13:01.771460 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_util_ssl.c(451): AH02412: [hy76:443] Cert matches for name ‘hy76’ [subject: CN=hy76 / issuer: CN=R10,O=Let’s Encrypt,C=US / serial: 03A3B67A15511CDA21150ACD6D2917C1D9CD / notbefore: Oct 2 11:15:54 2024 GMT / notafter: Dec 31 11:15:53 2024 GMT]
[Sat Nov 30 15:13:01.771497 2024] [ssl:info] [pid 1343:tid 132362641299328] AH02568: Certificate and private key hy76:443:0 configured from /etc/ssl/virtualmin/172120963577612/ssl.cert and /etc/ssl/virtualmin/172120963577612/ssl.key

hy77_error_log off
[Sat Nov 30 15:13:01.771818 2024] [ssl:info] [pid 1343:tid 132362641299328] AH01914: Configuring server hy77:443 for SSL protocol
[Sat Nov 30 15:13:01.773400 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(526): AH01893: Configuring TLS extension handling
[Sat Nov 30 15:13:01.776149 2024] [ssl:emerg] [pid 1343:tid 132362641299328] AH02565: Certificate and private key hy77:443:0 from /etc/ssl/virtualmin/171959300876691/ssl.combined and /etc/ssl/virtualmin/171959300876691/ssl.key do not match

[Sat Nov 30 13:41:09.544048 2024] [ssl:debug] [pid 1356:tid 135204331136896] ssl_util_ssl.c(451): AH02412: [hy78:443] Cert matches for name ‘hy78’ [subject: CN=hy78 / issuer: CN=R11,O=Let’s Encrypt,C=US / serial: 03FBB25F240171049EC04398C79ABD9B4643 / notbefore: Nov 10 14:55:52 2024 GMT / notafter: Feb 8 14:55:51 2025 GMT]
[Sat Nov 30 13:41:09.544086 2024] [ssl:info] [pid 1356:tid 135204331136896] AH02568: Certificate and private key hy78:443:0 configured from /etc/ssl/virtualmin/172330762125204/ssl.cert and /etc/ssl/virtualmin/172330762125204/ssl.key
[Sat Nov 30 15:13:01.510185 2024] [ssl:info] [pid 1343:tid 132362641299328] AH01914: Configuring server hy78:443 for SSL protocol
[Sat Nov 30 15:13:01.534567 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(2220): AH02209: CA certificate: CN=R11,O=Let’s Encrypt,C=US
[Sat Nov 30 15:13:01.534711 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_engine_init.c(526): AH01893: Configuring TLS extension handling
[Sat Nov 30 15:13:01.542737 2024] [ssl:debug] [pid 1343:tid 132362641299328] ssl_util_ssl.c(451): AH02412: [hy78:443] Cert matches for name ‘hy78’ [subject: CN=hy78 / issuer: CN=R11,O=Let’s Encrypt,C=US / serial: 03FBB25F240171049EC04398C79ABD9B4643 / notbefore: Nov 10 14:55:52 2024 GMT / notafter: Feb 8 14:55:51 2025 GMT]
[Sat Nov 30 15:13:01.542775 2024] [ssl:info] [pid 1343:tid 132362641299328] AH02568: Certificate and private key hy78:443:0 configured from /etc/ssl/virtualmin/172330762125204/ssl.cert and /etc/ssl/virtualmin/172330762125204/ssl.key

file error.log
[Fri Dec 06 13:02:52.551915 2024] [mpm_event:notice] [pid 449613:tid 124489742493568] AH00489: Apache/2.4.58 (Ubuntu) configured – resuming normal operations
[Fri Dec 06 13:02:52.552240 2024] [core:notice] [pid 449613:tid 124489742493568] AH00094: Command line: ‘/usr/sbin/apache2’

When the sites are working and then Apache stops, and after restarting it, the sites still do not work, where can I find the error and how can I fix it?

This is probably the issue.

Where did your TLS cert and key come from? Are you using Let’s Encrypt? If so, trying renewing the certificate manually and see if it sorts it out. (I don’t strongly think it will, but it’s easier than the thing that almost certainly will fix it, so try the simpler thing fix). (Only try renewing it once, though. You don’t want to lock yourself out of getting certificates from Let’s Encrypt by trying a bunch of renewals. If it fails once it’ll fail again until the problem is resolved.)

I manually renewed it, and the result was as follows:

sudo a2enmod ssl
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled

sudo pro status
SERVICE AVAILABLE DESCRIPTION
anbox-cloud yes Scalable Android in the cloud
esm-apps yes Expanded Security Maintenance for Applications
esm-infra yes Expanded Security Maintenance for Infrastructure
landscape yes Management and administration tool for Ubuntu
livepatch yes Canonical Livepatch service
realtime-kernel yes Ubuntu kernel with PREEMPT_RT patches integrated

For a list of all Ubuntu Pro services, run ‘pro status --all’

This machine is not attached to an Ubuntu Pro subscription.
See Ubuntu Pro | Ubuntu

sudo certbot certonly --standalone -d hy77

sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/ssl/virtualmin/171959300876691/ssl.key -out /etc/ssl/virtualmin/171959300876691/ssl.cert
…+…+…+.+…+…+…+…+…+…+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*…+…++++++ openssl x509 -in /path/to/certificate.crt -text -noout
Could not open file or uri for loading certificate from /path/to/certificate.crt
40E70559A37C0000:error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:…/crypto/store/store_register.c:237:scheme=file
40E70559A37C0000:error:80000002:system library:file_open:No such file or directory:…/providers/implementations/storemgmt/file_store.c:267:calling stat(/path/to/certificate.crt)
Unable to load certificate+++++++++++++++++++++++++++++++++++

grep -i 'SSLCertificate' /etc/httpd/conf.d/ssl.conf

grep: /etc/httpd/conf.d/ssl.conf: No such file or directory

openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)

Wait, no!

I meant in Virtualmin. Using certbot directly will break things (and maybe why things are broken, if you used certbot for domains that has previously gotten certificates using Virtualmin. You can use either certbot directly or Virtualmin, but you can’t mix and match. And, if you use certbot directly, you need to manually make the files available to all the services, the lack of which seems to be why everything is broken now.

You originally set it up with Virtualmin (we can tell because of the paths), so you shouldn’t change how you’re issuing certs.

I made a mistake in the server settings. How can we fix this? What exactly should I do

● apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-12-08 14:25:27 UTC; 37min ago
Docs: Apache HTTP Server Version 2.4 Documentation - Apache HTTP Server Version 2.4
Process: 1197 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 1342 (apache2)
Tasks: 55 (limit: 4608)
Memory: 9.3M (peak: 10.3M)
CPU: 414ms
CGroup: /system.slice/apache2.service
├─1342 /usr/sbin/apache2 -k start
├─1344 /usr/sbin/apache2 -k start
└─1345 /usr/sbin/apache2 -k start

Dec 08 14:25:25 hy77 systemd[1]: Starting apache2.service - The Apache HTTP Server…
Dec 08 14:25:27 hy77 systemd[1]: Started apache2.service - The Apache HTTP Server.

i have 3 web site public_html but not online how can doit before is online but now not

Hello any body have answer

not really, you have not given any apache error codes

this is not information

Hi all Apache2 its work know but php how can run agen