Where to host files - under /home or /srv

Hello,

I am hosting more than one website on my linode 512 with following linod's instructions about setting up a website.

In Ubuntu 10.04 LTS guide it says put your files under /home/user/publichtml/site-name/public but in LAMP guide it says to put your files under /srv/www/site-name/publichtml

Whats the difference between those and whats the perfect location to host files for multiple sites?

Thanks,

4 Replies

It's up to you really, if you're the only one on the server there's no difference.

If you have other users uploading files then /home tends to be easier since thats where they will have write access.

Internet served files should be stored under /srv.

See the Filesystem Hierarchy Standard:

http://www.pathname.com/fhs/pub/fhs-2.3.html

However it's your server so feel free to break that standard if you like.

I host all my site files under /rock

But Shhhhhh don't tell any of the bad guys they're there.

YMMV

I have a personal preference of saving all storage data (mail, web, FTP, projects, etc - although not DNS zone files) under /space.

The previous guy who managed the Linux servers where I work had a preference of using /brukere (Norwegian for "users"), but when it came time to reinstall some servers and migrate data from an old server to its new home, I used my preferred base path for all new and migrated data (making sure all customer scripts using a full path were using the new path in the process, of course).

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