Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-08 Thread Steve Dalton
Yes - I have it in the virtual host config for the particular named host (ie. the config in the sites-enabled directory on ubuntu) . It's running on the SSL part of the site (the non-SSL is a drupal site). It does work. I see what you mean on the .htaccess... great! Steve On Mon, Feb 9, 2009 at

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-08 Thread Matt McCutchen
On Mon, 2009-02-09 at 12:31 +1000, Steve Dalton wrote: > RewriteRule ^(.*)$ /var/www/accesstest/%{LA-U: > REMOTE_USER}/$1 > > didn't work for me. But > > RewriteEngine on > RewriteCond %{ENV:REDIRECT_PREFIXED_USER} !1 > RewriteRule ^(.*)$ /var/www/accesstest/%{REMOTE_ > USER}/$1 [E=PREFIXED_USER:

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-08 Thread Steve Dalton
Thanks Matt RewriteRule ^(.*)$ /var/www/accesstest/%{LA-U:REMOTE_USER}/$1 didn't work for me. But RewriteEngine on RewriteCond %{ENV:REDIRECT_PREFIXED_USER} !1 RewriteRule ^(.*)$ /var/www/accesstest/%{REMOTE_USER}/$1 [E=PREFIXED_USER:1] worked a treat - I didn't put it in .htaccess - just in th

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Matt McCutchen
On Thu, 2009-02-05 at 20:10 +1000, Steve Dalton wrote: > Matt - That method didn't work for me... it got into an internal > recursion and bombed out after 10 redirects. I think you do perhaps > need to test for something to stop it going on forever. Does this happen even with the rule in the vhost

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread André Warnier
Restarting at the beginning for a moment.. The aim is as follows : - a user connects to http://foo.com/ - he must and gets authenticated (say as "evilhacker") - following this, he should have access, and only access, to the documents located under /var/www/usersites/evilhacker/ , - so that his n

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Eric Covener
On Thu, Feb 5, 2009 at 3:41 AM, André Warnier wrote: > Matt McCutchen wrote: >> RewriteRule ^(.*)$ /var/www/accesstest/%{REMOTE_USER}/$1 >> > (Not trying to be sarcastic here, it's a genuine question) > > What happens if Evil Hacker me, logs in as user1 and then request in my > browser http://foo.

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread André Warnier
Eric Covener wrote: On Thu, Feb 5, 2009 at 3:12 AM, Matt McCutchen wrote: On Thu, 2009-02-05 at 18:01 +1000, Steve Dalton wrote: I managed to do something similar in the end, using the prefix user_ for each user directory then adding .htaccess to root dir of: AuthType Basic AuthName "Restrict

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Eric Covener
On Thu, Feb 5, 2009 at 3:12 AM, Matt McCutchen wrote: > On Thu, 2009-02-05 at 18:01 +1000, Steve Dalton wrote: >> I managed to do something similar in the end, using the prefix user_ >> for each user directory then adding .htaccess to root dir of: >> >> AuthType Basic >> AuthName "Restricted Files

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Steve Dalton
Matt - That method didn't work for me... it got into an internal recursion and bombed out after 10 redirects. I think you do perhaps need to test for something to stop it going on forever. Andre - I think you are right... that's why you still need to have a "Require user " in a seperate directive

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Steve Dalton
Thanks Matt I'll try that - looks a lot simpler... I'll also give it a good testing...:) Steve On Thu, Feb 5, 2009 at 6:41 PM, André Warnier wrote: > Matt McCutchen wrote: > >> On Thu, 2009-02-05 at 18:01 +1000, Steve Dalton wrote: >> >>> I managed to do something similar in the end, using the p

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread André Warnier
Matt McCutchen wrote: On Thu, 2009-02-05 at 18:01 +1000, Steve Dalton wrote: I managed to do something similar in the end, using the prefix user_ for each user directory then adding .htaccess to root dir of: AuthType Basic AuthName "Restricted Files" AuthUserFile /var/www/passwd/htpasswd Requir

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Matt McCutchen
On Thu, 2009-02-05 at 18:01 +1000, Steve Dalton wrote: > I managed to do something similar in the end, using the prefix user_ > for each user directory then adding .htaccess to root dir of: > > AuthType Basic > AuthName "Restricted Files" > AuthUserFile /var/www/passwd/htpasswd > Require valid-use

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-05 Thread Steve Dalton
Thanks guys I managed to do something similar in the end, using the prefix user_ for each user directory then adding .htaccess to root dir of: AuthType Basic AuthName "Restricted Files" AuthUserFile /var/www/passwd/htpasswd Require valid-user RewriteEngine on RewriteCond $1 !^user_ RewriteCond %{

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-04 Thread André Warnier
Matt McCutchen wrote: On Thu, 2009-02-05 at 15:13 +1000, Steve Dalton wrote: I'm running apache 2.2 on Ubuntu and I need to serve up a different directory depending on the user that is authorised with the server. I've check the mailing list and apache docs but haven't found much so far - I may j

Re: [us...@httpd] How to serve up different content depending on authenticated user

2009-02-04 Thread Matt McCutchen
On Thu, 2009-02-05 at 15:13 +1000, Steve Dalton wrote: > I'm running apache 2.2 on Ubuntu and I need to serve up a different > directory depending on the user that is authorised with the server. > I've check the mailing list and apache docs but haven't found much so > far - I may just not have the

[us...@httpd] How to serve up different content depending on authenticated user

2009-02-04 Thread Steve Dalton
Hi There I'm running apache 2.2 on Ubuntu and I need to serve up a different directory depending on the user that is authorised with the server. I've check the mailing list and apache docs but haven't found much so far - I may just not have the proper search terms though (I don't know how best to