Can I Register My Domain Into Sub-Directory of www folder ?

May 27, 2013 2k views
My current VPS hosts a domain and i bought another domain and i want it also on my VPS, my first domain holds the var/www folder, index etc. So how can i register my second domain as a separate www folder ?
1 Answer
Do you use Apache? I think you need to use virtual hosts. Check out this tutorial:
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache on Centos
Have another answer? Share your knowledge.