Marcin Wilk wrote:
Hello
Some time ago how can i do that:
Apache run in chroot & may read users website folders,
FTP for every user run in chroot.
The solution was to make user directories in /var/www/users/USERNAME &
make apache read their websites from /var/www/users/USERNAME/www
directory.
So i do that & chroot for apache & ftp work very well, & websites are
accessible with http://serverdomain/~username/ .
The problem is that when some user got some website & put in it links
like that:
<a href="/somelocation/somefile.html">something</a> it will not work
correct.
It will try to load http://serverdomain/somelocation/somefile.html
instead of http://serverdomain/~username/somelocation/somefile.html .
That is correct behavior. If they write bad html then that's what they get.
When I enter into some user directory from web browser
(http://serverdomain/~username/) & if folder is without index.html or
other index file there is link call "Parent Directory" that is
directing onto http://serverdomain/ but it should not be there.
Once again, that is correct behavior. You can turn off automatic index
pages, if you want.
The issue here is that you and/or your users are thinking they have a
web site, when in fact they have a directory tree within a web site. You
*may* be able to change things and get it doing what you want, but it
will be difficult and error prone. An easier solution would be to set up
what you want in the first place: virtual hosts. Instead of
http://www.domain.com/~username/ try http://username.domain.com/, one
for each user.
Part of my Apache configuration about user dirs:
UserDir /var/www/users/*/www/
<Directory /users/*/www>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Order deny,allow
Deny from all
</Limit>
</Directory>
What can i do with that? What did i do wrong here?
Best Regards
--
Darrin Chandler
[EMAIL PROTECTED]
http://www.stilyagin.com/