I have a slave server that is using letsencrypt for SSL certs and everything was working fine. Today a customer reported that their website was not coming up but rather another website url (that website is on the same server). Checked the customers wordpress site for redirection but found none. Seem to recall a while back there were issue with this happening but don't remember the cause. Anybody have a clue where to start troubleshooting this? I re-install SSL cert and checked the vhost file and it looks correct, so not sure whats redirecting it. Thanks
See faq section in the read before posting, it explains under which conditions a different website shows up in apache and nginx: https://forum.howtoforge.com/threads/please-read-before-posting.58408/
This problem can have 2 causes: - You have HTTPS enabled for domain A but not for domain B, will visiting domain B over HTTPS. It is Apache's default behaviour to show the first website in the list that has HTTPS enabled. - domain A is listening on * while domain B is listening on a specific IP, or vice versa. Make sure all your webs are listening on a specific IP or *. Checked the FAQ and all websites on that server are using * except for 1 that has a dedicated IP for the IP address. There are about 30 websites on this server and all seem to be working OK except for this one. Have re-installed SSL cert for both affected sites as well as the first website on that server which is different. Running out of ideas.
It is one of the above, plus of course typos in the domain name or using e.g. www while auto subdomain is none. If all of the above is ok, then take a look at the generated vhost file, might be that you are using custom apache or nginx directives on options tab that prevent the vhost change to be saved successfully.
I did find some infected Wordpress files with Wordfence and also had to clear cache and cookies and now its working corrrectly. Still can't figure out why it was redirecting to a valid website with totally different name but just glad its working. Thanks