Apache Virtual host Subdomains points to same directory
- by Jakobud
I have setup subdomains using Apache before and have never really ran into any big problems. But with this (I believe Centos) server that is one of my clients, I'm not understanding what I'm doing wrong. Here is the .conf that apache is loading:
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.thedomain.com
DocumentRoot /u1/thedomain.com/public
RailsEnv production
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain.thedomain.com
DocumentRoot /u1/subdomain.thedomain.com/public_html
</VirtualHost>
When I access either the primary or subdomain addresses, they both point to the primary www.thedomain.com content. Any thoughts?
UPDATE:
Yes I did a configtest and graceful after making the changes.