The best system structure to host more projects

Hi all, I'm going to buy a linode vps and I want to use it for many purpose:

  • redmine + svn/git for project managing and repositories

  • a groupware server ( egroupware / zimbra / something else )

  • many site hosting

So I have my main website with /var/svn and /var/git for repository and I'm a bit confused on how to structure it for websites.

I usually have only 1 localhost webserver and I have only 1 website on it. So before starting configuring my vps I want to ask you: which is the best way to organize my server?

I have 5 sites (example) to handle.

Have I to create 5 apache configuration ( site-enabled ) that point to 5 different home locations?

  • /home/project1/public_html/

  • /home/project2/public_html/

  • so on….

Is this the best way? How do you do?

Sorry for the stupid question but I want to make my server very clean on the structure :)

2 Replies

I think the answer that there is no right answer, so if you can come up with a structure that is manageable and makes sense to you, it's fine :-)

With that said, for my own systems, I've taken to using the /srv tree for most of my major hierarchies. You can use the top level as a service divider (e.g., /srv/svn, /srv/www) and the next level for per-machine/user/host, or invert the order, which is typically what I do (so /srv/xxxx/{svn,www,db,…} where xxxx is a company or common category for all the functions. Or combine the two approaches…

I also try to ensure uniqueness of the naming of the tree for any given purpose, so that when looking at multiple systems, I could theoretically combine all of their /srv trees safely if I wanted. Or taken another way, regardless of machine, a given /srv/xxx tree always has the same purpose.

I normally go ahead and make /srv (or for larger setups, each /srv/xxx) its own disk image for my Linode.

-- David

I go for the /home route, i.e.

/home/user/public_html

/home/user1/public_html

etc etc.

Then I have /home/git/user and /home/git/user1 to hold the git repos.

No real reason for it, probably because I started off with shared hosting on cpanel years ago which always sticks you in /home/user/public_html

Some of my clients have stuff in /srv and that works too.

Just pick something that you feel most comfortable with and stick to it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct