Oct 30 17:33:15 some.domain.eu systemd[1]: Starting A high performance web server and a reverse proxy server…
Oct 30 17:33:15 some.domain.eu nginx[14625]: nginx: [warn] “ssl_stapling” ignored, issuer certificate not found for certificate "/home/use>
Oct 30 17:33:15 some.domain.eu nginx[14625]: nginx: [emerg] cannot load certificate "/home/user-data/ssl/some.domain.eu-20240128>
Oct 30 17:33:15 some.domain.eu nginx[14625]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 30 17:33:15 some.domain.eu systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Oct 30 17:33:15 some.domain.eu systemd[1]: nginx.service: Failed with result ‘exit-code’.
Oct 30 17:33:15 some.domain.eu systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Yes, I did do
sudo rm -rf /home/user-data/ssl/*
obviously, some.domain.eu/admin is not available if nginx will not even start.
So, you (1) built a new 22.04 box, (2) installed MiaB, (3) deleted the ssl directory, (4) restored your duplicity backup from 18.04, (5) re-ran sudo mailinbox to complete configuration.
And after all that you’re getting this error? If I remember correctly, the SSL certs should have been part of the backup and should have been restored in step 4. Are there any files in your SSL directory, or is it empty?
What I don’t understand is why your nginx log message is trying to load /home/user-data/ssl/some.domain.eu-20240128, but your directory listing shows that you only have /home/user-data/ssl/some.domain.eu-selfsigned-20231030.pem present. Your current file is apparently “self-signed” which is incorrect. That’s what was in your duplicity backup?
I’m working off of 6-month old memory, but I believe that is incorrect. You are supposed to remove the contents of the SSL directory just once, before restoring the backup.
Like in the steps above that I asked about; 3) delete ssl directory, 4) restore backup.
Here’s what I recommend you try. Restore the backup to a different location (somewhere on this server, away from /home/user-data, or on another linux system). Remove the contents of the ssl directory on your MiaB server. manually copy the contents of SSL directory from the backup you just restored somewhere else to the ssl directory on your MiaB server. Run sudo mailinabox.
In other words, I don’t believe all is lost. But you need to get a copy of the ssl directory from your backup onto the new server in the correct location. Hopefully, if that’s all that’s wrong, the server should start working.
the trouble could be caused by the let’s encrypt certs having expired and the old instance of MIAB failing to get new ones. That is why I decided to do a fresh ubuntu 22.04
Updating system packages…
Installing system packages…
Initializing system random number generator…
Firewall is active and enabled on system startup
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable fail2ban
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…
FAILED: service nginx restart
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xeu nginx.service” for details.
Why not? Just to be clear, you MUST make sure the ssl directory is empty before restoring the files from the backup. There may be no files in this directory. I still see selfsigned certs in that directory, for example. At this point you may have to start over with the installation to make sure you’ve cleared out all the cruft that should not be there. Fortunately, you have your backup. Guard it safely. I’m curious as to why your backup is so old, but that’s neither here nor there at this point.
I do have another question about the nginx error. It’s trying to load a file that does not exist in your restored directory, “/home/user-data/ssl/some.domain.eu-20240128…”. Which I don’t understand and makes me wonder if there’s another underlying problem here. I looks as though the system is configured to use certs that have since been deleted.
Also, would it be possible to make a newer backup to use, or is the old system no longer functioning properly?