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: Satisfy any replacement in 2.4
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Fri 24 Jun '16 17:08    Post subject: Satisfy any replacement in 2.4 Reply with quote

Hello

I have a location which i want to be password protected when accessing from any foreign IP than mine

<Location /protected>
AuthType digest
AuthBasicAuthoritative Off
AuthName "protected"
AuthDigestProvider file
AuthUserFile "D:/Apache24/passwd/digest"
AuthDigestAlgorithm MD5
Require valid-user
Require ip MY_IP
</Location>

Unfortunately it doesn't work as expected - it ask for login and password even when connecting from MY_IP.

In Apache 2.2 i would add Satisfy Any in the end of the location to make it working. What is the correct configuration for 2.4 ?
Back to top
timo



Joined: 03 Jun 2012
Posts: 45
Location: FI, EU

PostPosted: Sat 25 Jun '16 7:57    Post subject: Reply with quote

<Location /protected>
AuthType digest
AuthBasicAuthoritative Off
AuthName "protected"
AuthDigestProvider file
AuthUserFile "D:/Apache24/passwd/digest"
AuthDigestAlgorithm MD5
<RequireAny>
Require valid-user
Require ip MY_IP
</RequireAny>
</Location>

See http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireany
and http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#logic
Back to top


Reply to topic   Topic: Satisfy any replacement in 2.4 View previous topic :: View next topic
Post new topic   Forum Index -> Apache