How do I host a site? How do I host multiple sites via a subdomain?

Posted January 24, 2016 6.2k views
Getting StartedLAMP StackDigitalOcean


As you might notice because of my question I am a complete beginner in running servers, I have done the basic setup for the server, have installed the LAMP stack, and added my domain name to the droplet. Though I am not sure where to go from now and how to actually upload and host my site on the droplet, I tried Filezilla but to no success. Also I would like to host two sites on the same droplet, I have made a subdomain but don’t have a clue on how I go about accessing it and hosting the files on the subdomain, so it is sort of a 2 in 1 question. I would appreciate any tips and information! Running Ubuntu if it is of any importance!


1 comment

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


Settings up a website or multiple websites is easy to do with a few services. You need to

  • Make a webservice (Apache, Nginx etc.)
  • Create your VHOST files (These are the configuration files for your webservice so it knows how to handle certain domains/subdomains and shows the site)
  • Create your website directories (/var/www is the default directory where you setup all your sites)
  • Run your webservice, and check your site

All of this is explained in this tutorial. Please read it closely and I think you will understand. If not and you still got any question, don’t hesistate to ask them.

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.