On Sun, Nov 26, 2000 at 07:55:48PM +0100, Martin Schulze wrote: > Hi, > > I wonder if some other Debian user can provide some assistance to an > Apache problem: > > 1. I'm running www.bar.org and www.foo.org via named virtual hosts on > one server using Apache (from woody) > > 2. Both addresses http://www.bar.org/~joey/ and > http://www.bar.org/~joey/ are valid.
Considering they're identical? :) [I assume one of those should be foo] > How can I configure that local users homepages are only available > under one of the two virtual servers? > > Or even better, how can I create a mapping www.foo.org has /~joey/ and > /~foo/ while www.bar.org has /~bar/ and a couple of others while one > virtual host being the default? How would you distinguish between the two? Would you have a directory structure like: .../webstuff/foo/joey/ .../webstuff/foo/foo/ .../webstuff/bar/bar/ If so, then you can just set the path for the 'UserDir' for each virtual server seperately. Something like 'UserDir /whatever/path/webstuff/foo/' in the foo virtualhost config and a similar one in the bar config will do that. (Note that you could also set up the path itself as a 'symlink forest' pointing to the real data elsewhere, which may be easier to set up and maintain.) If you want to do a db file (or even a program) like: foo.com.db: joey -> /home/joey/public_html foo -> /home/foo/public_html bar.com.db: bar -> /home/bar/public_html ... then mod_rewrite is your answer. It would be a bit more complex to set up (and not as 'self-documenting' as the directories are), but you can do a bit more with it. > Please always Cc to me when replying to me on the lists. icky, but you asked... -- CueCat decoder .signature by Larry Wall: #!/usr/bin/perl -n printf "Serial: %s Type: %s Code: %s\n", map { tr/a-zA-Z0-9+-/ -_/; $_ = unpack 'u', chr(32 + length()*3/4) . $_; s/\0+$//; $_ ^= "C" x length; } /\.([^.]+)/g;