Multiple Websites on a Droplet (and Other Queries)

Posted May 10, 2013 8.1k views
Hi, I am thinking of the following setup with just one droplet: a. test.[mydomainhere].com //a private test website for my own eyes only b. temp.[mydomainhere].com //a temporary website to showcase what I want to do to the public, will be powered by Wordpress and eventually be shut down in favour of something a bit more permanent c. [mydomainhere].com //the actual website once I am ready d. [any other websites in case I need them] So, here's my questions about it: 1. Will VirtualHosts be enough to create such a setup? 2. Is it possible to partition my Droplet (like how you do so on your hard disk drive) so that each website get their own sub-Droplet? 3. Will uninstalling Wordpress affect the entire Droplet (and therefore the other websites)? 4. What is the difference between the desktop and the server versions when it comes to OSes? (Or rather, am I right to say that the main difference is that the desktop is easier to use due to the inclusion of a GUI but the server is more suited for webhosting?) 5. Am I right to say that I should just stick to a x32 OS since I have only 512 MB of RAM on my Droplet? Thanks!

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.

17 answers
1. I think virtual hosts should solve your problem.
2. Do you mean separating resources like CPU, memory, hard drive? Most likely not. In case you do need such separation you will have separate droplets.
3. If you un-install any software it will affect any other part of the system that uses it. Installing and un-installing software on droplets affects entire droplet. There are ways to achieve separation but that's not you should expect out of the box.
4. All cool kids for server use Server addition :) Server vs Desktop for Ubuntu see
5. For me looks reasonable if you are not forced to use software that requires 64 bit (should not be a common thing).
1. Thanks, let me give that a try and report back here...
2. I just need to separate the hard drive (i.e. storage)
3. "achieve separation"... I was hoping to be able to do just that; where should I start?
4. Ahahaha, ok, I shall stick with the Server edition then :)
5. Ok, 32 bit it is :)
for # 3, you know that you can have multiple copies of wordpress installed right? just put them in different directories and create different databases for each. For example, I have each website in its own directory and point a domain or subdomain to each.
Thanks, I am not aware about being able to have multiple copies of WordPress (but why would you want to do that anyway since a WordPress installation can support many websites with its Multisite feature?)

As for different directories, will this do (below is just an example...)?

Website A: /var/www/123 (Non-WP)
Website B: /var/www/456 (Non-WP)
Website C: /web/site/c/[wordpress stuff goes here]
That should work fine. To answer your first question, I like to separate my wp sites so it's easier for me to move or manage them separately etc. I haven't used the multisite feature of wp before.
Thanks, I'll report back here once I get the stuff up. In the meantime, should I have a Linux user in charge of each website only or just use one user for the entire server?
@victoriousrock A separate user for each website is generally more secure as long as your permissions restrict other users from writing and/or reading other users' files.
Thanks, but I am not sure how to set that up as by following the initial setup guide here, I am unable to log in to the server with the new users (i.e. I can log in with only the new user I made right after logging in as root)...
You can use one user for all virtualhosts, and it'll work perfectly fine.
But that will mean I will be using only one Linux user for all (sub) websites right?

PS: I will use this guide for Virtual Hosts since my situation is more towards that (
Yes, it should work fine. You can use multiple accounts but make sure Apache can read the files so it can serve them.
It's up to you :]
Ah, I managed to figure the multiple users part (once I understood how to assign their home directories and set those file permissions correctly); am I right to say that the file permissions should be -rwxr--r-x for Apache to be able to work with them but yet remain secure?

PS: I am quite unsure about the security issues; I mean, is there anything else I can do to make the server more secure? I heard about Tripwire but there seem to be no way to apt-get it...
I can't get VirtualHosts to work by the way; tried both guides (the one I posted and the one here) but kept getting 404s :(
Ok wait, I figured that out; I forgot to make A records for the subdomains *facepalm*
@victoriousrock: Glad to hear it worked!
Thanks man, now I am trying to get the A and CNAME records to work properly; I can get to my websites via their exact names only (i.e. www.[subdomain].[mydomain].com will not work despite following the guides here... :O)

PS: And I managed to get WordPress working on the website too. Was a little tricky in the sense that you cannot remove the wordpress folder after the initial setup (even after you copied the files out to the "correct" /var/www directory); you have to do it before that...
@victoriousrock see my comment on
Submit an Answer