Difference between revisions of "Apache"
From MyWiki
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[ Recirecting according to hostname ]]<br> | ||
[[ Apache ProxyPass v RewriteRule ]] | [[ Apache ProxyPass v RewriteRule ]] | ||
Line 48: | Line 49: | ||
<br><br> | <br><br> | ||
− | <span style="background:#00FF00">'''Restricting access to Apache based on client ip address'''</span><br> | + | <span style="background:#00FF00">'''Restricting access to Apache based on client ip address'''</span> This works well and is tested.<br> |
+ | It can be put within a virtulahost section in ssl.conf<br> | ||
<source lang="text"> | <source lang="text"> | ||
<Directory /var/www/path/to/your/web/documents> | <Directory /var/www/path/to/your/web/documents> | ||
Line 58: | Line 60: | ||
</Directory> | </Directory> | ||
</source> | </source> | ||
+ | |||
+ | [[ Active Directory authentication in httpd.conf ]]<br> | ||
+ | Indexes - http://httpd.apache.org/docs/2.2/mod/core.html#options |
Latest revision as of 16:11, 13 June 2018
Recirecting according to hostname
Apache ProxyPass v RewriteRule
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> ( didnt work ) Order Allow,Deny allow from 158.222. allow from 11. deny from all </Limit>
Restricting access to Apache based on client ip address This works well and is tested.
It can be put within a virtulahost section in ssl.conf
<Directory /var/www/path/to/your/web/documents> Order allow,deny Allow from 192.168.0.0/16 Allow from 127 Allow from 10 Allow from 172.16 </Directory>
Active Directory authentication in httpd.conf
Indexes - http://httpd.apache.org/docs/2.2/mod/core.html#options