I'm trying to setup a website with subdomains on my server. Here's my setup:
VPS from RamNode with full root access
LAMP stack on Debian 7.0 (Wheezy)
Domain name from Namecheap, using RamNode DNS server
I've found various tutorials for how to setup subdomains, but they haven't worked, and I think it's because I'm unclear how they relate to my setup (i.e. they're intended for shared hosting, etc.)
I'm wondering, to set up a subdomain: What do I need to configure with the DNS? What do I need to configure with apache?
My main source of confusion is that cPanel, which is used to configure the RamNode DNS, allows adding subdomains, but it asks me to specify a "root" folder, which defaults to
/home/user/public_html. It requires that the folder be somewhere in
However, I have my webpage in
/var/www. Moreover, when I look at the files in cPanel, everything is empty. It doesn't seem to be pointing to my VSP installation, but some totally different filesystem.
I've got a lot of Linux and programming experience, but very little with networking, servers or apache. I will be the first to admit that I don't understand how DNS works, so I'd be happy if someone could point me in the right direction.
I'm happy to give more information, but I don't want to just dump every log I have, so if there's something that will be helpful to provide, let me know and I can give it.