Host two websites on one droplet, on a domain and a subdomain

January 29, 2016 2.2k views
Ubuntu Configuration Management LEMP


I want to install ocotber CMS or Drupal on the domain and a nodeBB forum on the subdomain, both on the same droplet.

What plan should I choose for a 1000+ community on NodeBB and a periodically updated Ocotber CMS website?
What steps should I approach towards installing both of the on the same droplet, using the domain to access the CMS and the subdomain to access the forum?
An installation of both via docker would be easier? should I choose a bigger plan considering I want to create two websites and docker’s images have to be periodically cleaned? Also, should I choose a lighter distribution?

Thank you :D

1 Answer

Serving multiple sites from a single server is a matter of configuration. Configure DNS to point your domain & subdomain to your server’s IP. Install your applications wherever you choose, being mindful of appropriate permissions. Then configure your web server to serve requests to your domain or subdomain from the location where you have installed the application.

For applications requiring a database server (MySQL/MariaDB/Postgres/etc), you will need at least a 1 GB droplet. You will run into memory problems with anything less. That will probably be sufficient to run what you are proposing. If it turns out that it’s not enough, it’s easy to move up to the next larger droplet.

Have another answer? Share your knowledge.

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