11

I'm a bit scared to ask this because I got so many negative votes for simply asking a question last time, but here goes;

Where in the Linux (Ubuntu) directory structure is it 'normal' to put public and private website files.

Say I have a server and I want directories;

mysite1.co.uk/
mysite1.co.uk/www/
mysite2.co.uk
mysite2.co.uk/www/

where would they normally be put?

Update: I'm using Nginx (not Apache).

Nigel Alderton
  • 992
  • 3
  • 9
  • 19
  • This is probably because this is a too basic question which indicates that you didn't read any documentation, HOWTO or just googled. – mailq Aug 09 '11 at 19:43
  • 3
    I have seen `/var/www/fqdn` and `/srv/www/fqdn` on various systems. – Zoredache Aug 09 '11 at 19:53
  • http://serverfault.com/questions/267183/home-vhosts-or-var-www/267184#267184 – Zoredache Aug 09 '11 at 19:55
  • @mailq I did Google. For example; http://www.tuxfiles.org/linuxhelp/linuxdir.html and http://www.thegeekstuff.com/2010/09/linux-file-system-structure/ and http://www.debianadmin.com/linux-directory-structure-overview.html and one other I can't remember. – Nigel Alderton Aug 09 '11 at 20:00
  • 2
    Have a +1 for having the balls to ask a fair question on what can be intimidating site! But like others have said, it doesn't matter where you place the files, it can boil down to personal preference. – Coops Aug 09 '11 at 20:15
  • @Coops. Thanks! Nice to know it's not just me that finds it somewhat intimidating. – Nigel Alderton Aug 09 '11 at 20:19

2 Answers2

6

Under /var/www. But this is not a convention you have t follow. You can put them wherever you want, as long as Apache has access to it.

mailq
  • 17,023
  • 2
  • 37
  • 69
1

I use

/var/vhosts/domain.name/html
/var/vhosts/domain.name/logs

but /var/vhosts is a symlink to /srv/vhosts in my case. I had my cake and ate it.

EightBitTony
  • 9,311
  • 1
  • 34
  • 46