Nginx won't start after move to a new box

TLDR: Everything is up and working.

From what I can tell, the root of the problem was that in my haste to get the new box up and running, I had provisioned an SSL cert prior to doing the restoration of my backup. This created a situation where nginx was trying to find a .pem file that wasn’t on my box after the restore. (The file also didn’t exist on my old box, so I couldn’t pull it from there either.)

I eventually ended up just destroying the box and spinning up a new one, doing just enough setup of MIAB to get it running and access to the admin panel. Once that had completed I restored the backup, then deleted the contents of /home/user-data/ssl (leaving the directory intact!) and re-ran setup (sudo mailinabox) to re-provision the certificates.

After that finished, I shifted my glue records and secondary DNS entries to point to the new box. When things had mostly stabilized with DNS entries, I was able to then provision a new certificate (instead of the default self-signed one that generated at install) and things are all working properly.

Big thanks to @alento for the assist.

2 Likes