Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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;

where would they normally be put?

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

share|improve this question
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 9 '11 at 19:43
I have seen /var/www/fqdn and /srv/www/fqdn on various systems. – Zoredache Aug 9 '11 at 19:53
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 9 '11 at 20:15
up vote 4 down vote accepted

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.

share|improve this answer
Thanks. Actually I'm using Nginx not Apache. Does that change your recommendation? – Nigel Alderton Aug 9 '11 at 19:52
no. Doesn't change anything. – mailq Aug 9 '11 at 19:54
Ok, thanks again. – Nigel Alderton Aug 9 '11 at 20:11

I use


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

share|improve this answer

Your Answer


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.