Difference between revisions of "Apache"

From MyWiki
Jump to: navigation, search
Line 25: Line 25:
 
allow from all
 
allow from all
 
</Limit>
 
</Limit>
 +
</source>
 +
<source lang="text">
 +
Order Allow,Deny
  
 
+
    This is a Deny by default mode. Where you will give optionnaly a list of Allow rules.
 +
    Then the Allow rules are checked, And someone willing access must match at least one rule.
 +
    If someone gets allowed by one of the Allow rules you can still reject him with a Deny rule.
 +
   
 +
    <Limit GET>
 +
    Order Allow,Deny
 +
    allow from 158.223.
 +
    allow from 10.
 +
    deny from all
 +
   
 +
    </Limit>
 
</source>
 
</source>

Revision as of 14:04, 14 October 2014

An example of this is using access control to assure that, although a resource is password protected 
from outside your network, all hosts inside the network will be given unauthenticated access to the resource. 
This would be accomplished by using the Satisfy directive, as shown below.
 
<Directory /usr/local/apache/htdocs/sekrit>
AuthType Basic
AuthName intranet
AuthUserFile /www/passwd/users
AuthGroupFile /www/passwd/groups
Require group customers
Order allow,deny
Allow from internal.com
Satisfy any
</Directory>

http://rhcelinuxguide.wordpress.com/2006/07/02/all-htaccess-tips-and-tricks/

<Limit GET>
order deny,allow
deny from 123.456.789.000
deny from 456.78.90.
deny from .aol.com
allow from all
</Limit>
Order Allow,Deny
 
    This is a Deny by default mode. Where you will give optionnaly a list of Allow rules.
    Then the Allow rules are checked, And someone willing access must match at least one rule.
    If someone gets allowed by one of the Allow rules you can still reject him with a Deny rule.
 
    <Limit GET>
    Order Allow,Deny
    allow from 158.223.
    allow from 10.
    deny from all
 
    </Limit>