I successfully setup virtual hosts on my droplet with CentOS 6.4 x32 I was following this tutorial. https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-centos-6
Everything is good except, some issues.
If I setup virtual hosts, my default landing page is changed and pointing to one of my domain location. I want it to be some specific page or default CentOS setup page. This http://i.imgur.com/NLSJR.png After setting up virtual hosts, my default page is one of my domains page which I do not want.
www.domain.com and domain.com are working fine and pointing to same location/page. But if I type a.domain.com or random.domain.com, it still points to my that location which I do not want. I want it to give error. I assume this random subdomains are pointing to main domain because I added wildcard entry *.domain.com as ServerAlias in httpd.conf. But if I do not add this wildcard then random subdomains points to one of my different domain.
Any ideas on these issues.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!