How can I point my domain to a subdirectory off root?

Posted October 7, 2014 25k views

Hey thanks for reading,

I have an Ubuntu droplet running Apache and I just registered for a domain name. The problem is, my site is located at ‘my-ip-address/folder’ and my domain points at 'my-ip-address.’

What do I need to do to have it send the user to the right place?

edit: I also want to mention I plan on hosting multiple sites from this server, so I’d prefer any help that will be best with that in mind.

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.

Submit an Answer
1 answer

To answer my own question:

After a bunch of reading until I figured out how to properly ask the web my question, I found this guide:

All’s well! Thanks

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.