10-01-2013, 11:06 PM #1New Member
- Join Date
- Oct 2013
(Help) Subdomain on Apache VirtualHost issue
I'm just setting up a new VPS and currently stuck on sub domain issue.
I'm still hosting with other shared hosting with cPanel, creating subdomain just easy as 123. Create sub domain, point A record to that IP hosting and done.
I have my domain hosted on name.com
But now the issue with the VPS is, I've got everything installed, BIND, LAMP.
Pointing A record of my domain to vps, and it worked.
Now I created sub.domain.com on Apache and point A record to the VPS IP but it's displaying the same page as domain.com instead of sub.domain.com
What did I do wrong actually?
Where do I need to start to check everything works correctly?
Below is apache2.conf for virtualhost
10-01-2013, 11:30 PM #2Retired Moderator
- Join Date
- Feb 2005
Does the directory "/www/sub.domain.com" exist, or did you mean "/var/www/sub.domain.com/"? If there are errors in your virtualhost definitions an apache restart (or configtest, preferably) will usually show them up.Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
10-02-2013, 12:58 AM #3Temporarily Suspended
- Join Date
- May 2013
What OS you are using? If you are working on Debain / Ubuntu with Apache 2 installation, apache2.conf is not the right place to add your virtualhosts. If its Debain / Ubuntu
1. Either go to /etc/apache2/sites-available/ ; create a new file /etc/apache2/sites-available/domain.com and put your virtualhost config to there. Then enter " sudo a2ensite domain.com " .Repeate the same steps for each your domain and reload apache2 finally.
2. put all your virtualhosts configuration to /etc/apache2/sites-available/default ; choose this option if you don't want to add toomuch of domains as this comes with less flexibility to handle your domains.
The following may be a good read for you
By wdteam in forum VPS HostingReplies: 7Last Post: 08-27-2011, 04:11 PM
By php4ever in forum Dedicated ServerReplies: 12Last Post: 06-01-2007, 09:39 PM
By lachtan in forum Hosting Security and TechnologyReplies: 1Last Post: 11-15-2004, 12:04 AM
By vanHelsing in forum Hosting Security and TechnologyReplies: 2Last Post: 09-07-2004, 10:30 PM
By MasterBrian in forum Web HostingReplies: 12Last Post: 06-02-2001, 11:17 AM