Hey I'm using webmin to manage the apache server on my CentOS box and I'm trying to set my subdomains to a different directory. However the subdomain and the actual domain both go to the exact same page
<VirtualHost *>
DocumentRoot "/home/windshear-gaming.com/public_html/forum"
ServerName forum.windshear-gaming.com
</VirtualHost>
<VirtualHost *>
DocumentRoot "/home/windshear-gaming.com/public_html/portal"
ServerName windshear-gaming.com
</VirtualHost>
Thats how I setup the virtual hosts for the two different subdomains. Everything else was just left the same.
Best Answer
In your /etc/httpd/conf/httpd.conf
That will answer your domain and subdomain in every IP your webserver is listening to correctly.