Apache Authorization: Valid IP or Password (GET requests only)

Posted on 2009-12-17
Last Modified: 2012-05-08
I have a list of IP address ranges for people who should be granted access to the website.

Everybody else should be required to enter a password.

However, all requests sent method=post should be allowed.  Only GET requests should require a password or valid IP.

I understand that this is NOT secure however I  don't need this for security reasons.
Question by:hankknight
    LVL 50

    Accepted Solution

    You need the <Limit> directive:

    >>>  I  don't need this for security reasons.

    Hrrmmm...that's what passwords are for, yes?  To protect content from unauthorized access?  Remember, all it takes is one smart idiot.
    LVL 16

    Author Comment

    <Limit GET>
    AuthName "Authorization Required"  
    AuthUserFile "/home/html/.htpasswd"  
    AuthType Basic  
    Require valid-user  
    Order allow,deny 
    Allow from 11.22.33  
    Allow from  
    Allow from  
    Satisfy Any

    Open in new window


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now