

Ask HN: What are your (web) server setup conventions? - jokull

I'm doing freelance projects and sometimes have to host my sites. I'm really lost as to how I should organize everything though. I've just set up a new slice and I want to ask the community how, apart from the "apt-get install" commands, people organize and set up their servers.<p>1. Is the /usr/local directory good for anything?<p>2. Where do you stick site code?<p>3. Where do you stick user submitted content?<p>4. Where do you stick custom compiled binaries?<p>5. Any other tips or conventions you want to share?
======
delano
1\. /usr/local is where you install custom compiled binaries (which answers
#4). /usr should contain only standard binaries, libraries, headers, etc...

2\. Some people use /usr/local, others use generic home directories
(/home/PROJECT), and still others use /PROJECT. This is somewhat of a personal
choice.

3\. If user content is uploaded directly to the filesystem, create a separate
file system for it (if your root or project filesystems fill up, you're
hooped). You could also consider uploading to S3 or a similar service.

4\. See #1

5\. Be consistent and make notes about where things go (to remind yourself in
6 months and to make it easier to hand off). Also, be mindful of the
filesystem permissions.

~~~
jokull
Very useful thank you.

