Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Several websites in a single server

Hey Nick Pettit, you mentioned that it is possible to upload more than one website to a single shared web server in the web hosting video. What would the standard practices be to do this correctly?

For instance, let's say you want to upload several projects you have developed but are not really aiming for traffic, but to showcase your work to just a few people. How would you go about it?

Thanks a lot.

4 Answers

Each site can be in a subdirectory. You can even configure a subdomain for each one. However, I don't think its possible to have multiple sites in one account where each is on its own domain.

It's possible. Look into the cPanel feature called Addon domains, Jose.

You can place a site in a sub directory and forward a domain name to it. Then use the .htaccess file to have it display the correct domain name.

It's possible. If you want each site to have it's own domain, use the cPanel feature called Addon Domains.

Thank you for your answers guys. So, according to Aaron's and Jeremy's replies, you both do it locally by arranging the files and if wanting several domains using the .htaccess file. And according to Adam, using the cPanel - Addon Domains from your hosting company.

Adam, does doing that create any additional files in your folders, such as the .htaccess file? I'm just wondering whether doing it one way or another is still the same process, just yours being automated by the hosting company and the other manually by creating it yourself.

I would like to know how do you do this when you control the server yourself or at least the virtual server. For example, if you launch an instance in Digital Ocean and control it from your terminal, I think there is a process you can launch that generates the same result, but I don't know how to go about it. Just trying to learn the different ways in which this can be done. I know I could ask the hosting company, but I am posting it here for the sake of discussion.