4 ms·
Ask HN: What are your (web) server setup conventions?
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.
1. Is the /usr/local directory good for anything?
2. Where do you stick site code?
3. Where do you stick user submitted content?
4. Where do you stick custom compiled binaries?
5. Any other tips or conventions you want to share?
- delano 17y ago1. /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 17y agoVery useful thank you.