Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Silly question: I'll be moving about 5-7 small / personal web sites (blogs, forums, web projects, etc) over to a single VPS host and would like recommendations on where to store each site within the linux file system.

My main goals:

  • Keep things scalable. I'd like the structure to allow for future sites.
  • Keep things reasonably secure.

Your thoughts?

-M

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Take a look at FHS:

The old place was /var/www, now I'd argue for using /srv.

I'm also a fan of using /srv/$fqdn/{htdocs,logs,cgi-bin}, etc. But you can do it the other way around also /srv/{htdocs,logs,cgi-bin}/$fqdn. And you can have both. A small script or makefile to update links isn't terribly hard to write.

share|improve this answer
    
Thanks! That's what I was looking for. I like the /srv/$fqdn/{htdocs,logs,cgi-bin} structure as I can keep everything in a central location. –  Mike B Nov 13 '09 at 22:55
add comment

In the linux world, it would often be in /var (some might say /home, etc.). So the question might be depth vs breadth first:

/var/xxx/www
/var/xxx/logs
/var/xxx/db

/var/yyy/www
/var/yyy/logs
/var/yyy/db

vs

/var/www/xxx
/var/www/yyy
/var/logs/xxx
/var/logs/yyy
/var/db/xxx
/var/db/yyy

I'd say most lean towards the second.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.