How to point different domains to different folders?

I setup a domain name ( in the DO droplet. I then installed Vesta CP and provided the domain information whenever it asked. When I opened my domain name on the browser it showed me a panel welcome page (not the actual panel admin login but a panel html page saying powered by vesta).

Now, I added two more domains to my DO and now want to point them to different folders. I went through article to setup Apache virtual hosts. But, now whenever I try to go to any of these domains on my browsers it keeps going to the panel page for my first domain.

I dug around a bit and it seems like the panel page is in /home/admin/web/ Both of the secondly added domains are pointing to this.

Any idea what I am doing wrong and how can I fix this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


You don’t need to remove VestaCP if you need a control panel to manage your domains. Without a CP, you’d need to manually install a LAMP or LNMP stack and do what the CP would do by hand.

That being said, removing VestaCP won’t delete your existing users and domains, so they will still be pointing to the directories they were set to when VestaCP was installed.

VestaCP wasn’t redirecting your domains. It creates a directory for each user and each domain that you create through the control panel. Each domain that is created is given an index.html file, so it’s not redirecting your domains to a central index.html, it’s simply pulling up the index.html file that resides in each domains’ public_html directory.

If you substitute your domains in place of domain01 and domain02 above, you’ll see where the index files are.


From what I’ve read about VestaCP, they recommend against directly modifying Apache config. This is most likely because any changes you make directly will be overwritten by VestaCP the next time that you create a domain or sub-domain, or make any changes that cause changes to be made to Apache config.

That being said, VestaCP uses /home for each user. So if you added these domains using the default admin user, your base directory would be /home/admin and each of your domains main directories would be located in /home/admin/web.

For example, if you created and, then their directories would be:




and their public_html folders would be:




Within each of the public_html directories, there’s an index.html file which is copied over from the main directory. That’s why you’re seeing the Powered By VestaCP when you visit your domains. You need to delete or replace this file and upload your websites files to the public_html directories.