Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 need to set up a Apache server configuration for some client sites that run under the same Ubuntu 9.10 machine. All sites are allowed to run PHP, Python and Ruby on Rails. I do not control the source code of these sites and so I need to set up a filter in order to prevent one user to reach files on another users account.

If I run a script to list files in "/" from one account, I can browse some files and directories in the actual server root. I want to set the root for each account to /var/ instead so that listing files in "/" shows the files in the client's root.

How is this most easily configured?



share|improve this question

You probably want to take a look at this wiki:

If you just want to have files unreachable/unseen then why don't you just set the files to 700?

share|improve this answer
700 won't work because the webserver will need permissions to access the directory. – jneves May 11 '10 at 21:31

I would set up a separate virtual server for each site, each with it's own DirectoryRoot such as /var/ Then, to make sure that only the user has access, I would require authentication to view the site. This can all be done in the httpd.conf file.

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.