Author |
|
mcole
Joined: 18 Sep 2007 Posts: 5
|
Posted: Tue 18 Sep '07 10:04 Post subject: Problems with htaccess and <location> |
|
|
I recently found that Apache was suddenly ignoring my root htaccess file. I traced the problem to the following <location> entry...
<Location />
<Limit CONNECT>
order allow,deny
deny from all
</Limit>
</Location>
this is the root directory entry
<Directory e:/webroot>
Options FollowSymlinks IncludesNOEXEC ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Deny from env=banned
</directory>
I have various "Deny" entries in htaccess.
If I remove the <location> block the htaccess correctly blocks denied IP's
but when the <location> block is active entries in htaccess are ignored!
Since it is difficult for me to test different methods of implementing the settings to block attempts to CONNECT (which is the sole reason I have the <location> block which I cribbed from a forum posting) I wonder if anyone can suggest how I can block attempts to use CONNECT while still allowing my htaccess to be effective or indeed knows why this is affecting htaccess at all?
Many thanks.
Mark. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 18 Sep '07 10:29 Post subject: |
|
|
Do you load the env module?
LoadModule env_module modules/mod_env.so
How did you declare banned in httpd.conf? |
|
Back to top |
|
mcole
Joined: 18 Sep 2007 Posts: 5
|
Posted: Tue 18 Sep '07 22:23 Post subject: |
|
|
James Blond wrote: | Do you load the env module?
LoadModule env_module modules/mod_env.so
How did you declare banned in httpd.conf? |
mod_env is loaded banned is set by various BrowserMatch entries eg: BrowserMatchNoCase "^morfeus.*" banned
But the thing is, if I remove the <location> block the problems with htaccess go away and I cannot see how the two are related!
Mark. |
|
Back to top |
|
mcole
Joined: 18 Sep 2007 Posts: 5
|
Posted: Sun 23 Sep '07 13:43 Post subject: |
|
|
Anyone had any more thoughts about this? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 24 Sep '07 14:03 Post subject: |
|
|
Quote: |
but when the <location> block is active entries in htaccess are ignored!
|
Did you enable AllowOverride for that location? |
|
Back to top |
|