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

January 24, 2016 729 views
Getting Started LAMP Stack DigitalOcean


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
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.
  • Thank you, just what I was looking for, though I am having an issue with it - the subdomain page displays what I want for it to display but my main page still keeps displaying the apache2 default page, I asked the question on the actual tutorial but there isn't a lot of activity going around there.

Have another answer? Share your knowledge.