Jump to content


Photo

access control - how to do multiple rules ?


  • Please log in to reply
2 replies to this topic

#1 JoeJoe

JoeJoe
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 27 August 2006 - 03:52 PM

Hi guys,

After read all the Apache documents, I got no answer for this.
How to config 2 sets of login/password? one is allow from all IP and one is from internal network only.

the order, deny, allow, satisfy stuff only help if one wants
1) login from all IP/domain
or/and
2) request from certain IP/domain WITHOUT login

that is different from what I want, anyone knows how to solve this?

thank you very much

JoeJoe

#2 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 04 September 2006 - 09:46 PM

Just change it to how you want it
Join my Froums www.phpbbplanet.com/darkwinter

#3 R_P

R_P
  • Members
  • PipPipPip
  • Advanced Member
  • 98 posts

Posted 05 September 2006 - 03:22 PM

JoeJoe,

Check out setEnvIf at http://httpd.apache....d_setenvif.html

mod_access does not directly support referrer-based and URI based access control, but it can be accomplished using mod_sentenvif and the supported "Allow from env=<server_variable" construct. Here's a simple example:

setenvif Referer www.ok_site.com OK_allow
...
Allow from env=OK_allow

-or-

setenvif Request_URI ip-regex-here OK_allow
...
Allow from env=OK_allow
See mod_setenvif

Good Luck
Pro in: Win2K3S | Apache2 | PHP5 | Perl5 | MySQL | MSSQL | Firefox | Photoshop
Student of: Ubuntu6 | Java | C | VB.NET | ASP.NET
Developer: Roddzilla Webstudios, Burrson CG, DVIDSHUB, The Four Nations
Student: Georgia Tech, Georgia Tech College of Computing




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users