I don’t know what has gone wrong with my settings, but when I create a new vhost, it is being redirected to the default vhost. All the old vhosts work fine. I have checked the directives of the new vhost, both non-ssl and ssl, everything looks normal. I have gone through all possible options, as much as I could. Do you have any idea what might have gone wrong?
This is pretty much always some variant of “the wrong site shows up” from the troubleshooting websites doc.
You’ve got mix-and-match use of * and IP VirtualHosts, or you’ve got misconfigured IPv6, or you’ve got some other variant. The logic Apache uses to determine what to serve is wildly unintuitive (but consistent).
So, look at the VirtualHost definitions, and if it’s not clear what’s wrong, show us your VirtualHost definitions. You can anonymize the hostnames if you want, they usually don’t matter.