2

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/usersite.com/www/ instead so that listing files in "/" shows the files in the client's root.



How is this most easily configured?



Cheers!


/Christoffer

2 Answers 2

1

You probably want to take a look at this wiki:

https://help.ubuntu.com/community/DebootstrapChroot

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

1
  • 700 won't work because the webserver will need permissions to access the directory.
    – jneves
    May 11, 2010 at 21:31
0

I would set up a separate virtual server for each site, each with it's own DirectoryRoot such as /var/usersite.com/www/ 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .