Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th March 2008, 20:39
Ken Reed Ken Reed is offline
Junior Member
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache login - howto direct group to a directory

Hello,

I would like to direct a client to a directory dependent on the login.

For example Dan logs in as a member of group admin requesting file index.html and is automatically presented with /var/www/html/admin/index.html. Subsequently he is only served files from /var/www/html/admin/ .

If Joe logs in as a member of group user requesting file index.html he is automatically presented with /var/www/html/user/index.html. Subsequently he is only served files from /var/www/html/user/ .

Does anyone know how that may be done?

2nd. question, how can I get the username & group of the requestor of a page?

Thanks in advance - Ken
Reply With Quote
Sponsored Links
  #2  
Old 13th March 2008, 18:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Quote:
Originally Posted by Ken Reed
Hello,

I would like to direct a client to a directory dependent on the login.

For example Dan logs in as a member of group admin requesting file index.html and is automatically presented with /var/www/html/admin/index.html. Subsequently he is only served files from /var/www/html/admin/ .

If Joe logs in as a member of group user requesting file index.html he is automatically presented with /var/www/html/user/index.html. Subsequently he is only served files from /var/www/html/user/ .

Does anyone know how that may be done?
You could do this with PHP (or any other scripting language, e.g. Ruby or Perl).

Quote:
Originally Posted by Ken Reed
2nd. question, how can I get the username & group of the requestor of a page?
You can set a cookie, or, if the user has disabled cookies in his browser, use session ids.
http://www.onlamp.com/pub/a/php/exce...s_8/index.html
http://www.php.net/setcookie
http://www.php.net/session
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
directories in /home/admispconfig/ispconfig renamed? Spudchat General 10 12th April 2007 19:37
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
64-bit Debian 3.1 Install Issue naruto Installation/Configuration 14 5th September 2006 04:12
Problems with Apache and Updating Jubalint Installation/Configuration 2 21st May 2006 19:50
Mysterious Install Problem tgansert Installation/Configuration 5 9th May 2006 15:35


All times are GMT +2. The time now is 18:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.