?
Solved

Apache Authorization: Require password if IP not white-listed

Posted on 2009-12-16
1
Medium Priority
?
175 Views
Last Modified: 2012-05-08
I have a list of IP addresses for people who should be granted access to the website.

Everybody else should be required to enter a password.

My code does not work.

Order deny, allow 
Deny from all 
AuthName "Authorization Required" 
AuthUserFile "/home/html/.htpasswd" 
AuthType Basic 
Require valid-user 
Allow from 11.22.33 
Allow from 22.22.33.44 
Allow from 55.44.33.22 
Satisfy Any

Open in new window

0
Comment
Question by:hankknight
1 Comment
 
LVL 51

Accepted Solution

by:
Steve Bink earned 2000 total points
ID: 26069390
Try this instead:
AuthName "Authorization Required" 
AuthUserFile "/home/html/.htpasswd" 
AuthType Basic 
Require valid-user 
Order allow,deny
Allow from 11.22.33 
Allow from 22.22.33.44 
Allow from 55.44.33.22 
Satisfy Any

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question