@Madchatthew, thanks! I’ve set up Nginx and added SSL for both domains.
At first, I used DigitalOcean’s one-click setup to install Ghost on domain.com. Later, I also installed Ghost on domain2.com, and that worked without any issues.
But when I tried setting up wp.domain.com for WordPress, it kept redirecting to domain2.com instead of wp.domain.com after doing all the ngnix settings.
I gave up on that setup and tried installing WordPress on another droplet with a LEMP stack, but I ran into an issue with the upload file size limit. I might chose to Hostinger for hosting WordPress instead.