Setting Up New VPS Apache Problems

AllBizNiz

Living The Dream
Oct 27, 2009
1,690
21
0
Ohio
I'm moving shit over to a new VPS and have been having a problem with Apache wondering if anybody here has seen this and knows a solution. I'm moving over like 20 sites and started setting up my virtual hosts in the Apache config file.

Here's what I've been using from Apache's site.

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>

I've got my doc root set to htdocs folder. My problem is if I access my server by its IP address it takes me to my virtualhost. I can't seem to figure out why this is happening. Has anybody had a similar experience? I've been trying to figure this out for a couple days now. Thanks in advance.
 


Ok, I was being an idiot. Finally figured this problem out. I looked at my code again and was using the serveralias tag instead of server name which was fucking it up.