logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problems with htaccess and <location>
Author
mcole



Joined: 18 Sep 2007
Posts: 5

PostPosted: Tue 18 Sep '07 10:04    Post subject: Problems with htaccess and <location> Reply with quote

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

PostPosted: Tue 18 Sep '07 10:29    Post subject: Reply with quote

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

PostPosted: Tue 18 Sep '07 22:23    Post subject: Reply with quote

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

PostPosted: Sun 23 Sep '07 13:43    Post subject: Reply with quote

Anyone had any more thoughts about this?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 24 Sep '07 14:03    Post subject: Reply with quote

Quote:

but when the <location> block is active entries in htaccess are ignored!


Did you enable AllowOverride for that location?
Back to top


Reply to topic   Topic: Problems with htaccess and <location> View previous topic :: View next topic
Post new topic   Forum Index -> Apache