Skip to content

Instantly share code, notes, and snippets.

@tkhn
Created October 9, 2013 10:33

Revisions

  1. goldenbarb revised this gist Oct 9, 2013. 1 changed file with 12 additions and 12 deletions.
    24 changes: 12 additions & 12 deletions apache-exclude-urls-basic-auth.conf
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    <location />
    SetEnvIf Request_URI "/callback/.*" REDIRECT_noauth=1

    AuthType Basic
    AuthName "Restricted Files"
    AuthUserFile /etc/httpd/passwords/passwords
    Order Deny,Allow
    Satisfy any
    Deny from all
    Allow from env=REDIRECT_noauth
    Require user yournickname
    </location>
    SetEnvIfNoCase Request_URI "^/status\.php" noauth

    AuthType Basic
    AuthName "Identify yourself"
    AuthUserFile /path/to/.htpasswd
    Require valid-user

    Order Deny,Allow
    Deny from all
    Allow from env=noauth

    Satisfy any

    # credits to http://stackoverflow.com/questions/8978080/htaccess-exclude-one-url-from-basic-auth
  2. goldenbarb created this gist Oct 9, 2013.
    14 changes: 14 additions & 0 deletions apache-exclude-urls-basic-auth.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <location />
    SetEnvIf Request_URI "/callback/.*" REDIRECT_noauth=1

    AuthType Basic
    AuthName "Restricted Files"
    AuthUserFile /etc/httpd/passwords/passwords
    Order Deny,Allow
    Satisfy any
    Deny from all
    Allow from env=REDIRECT_noauth
    Require user yournickname
    </location>

    # credits to http://stackoverflow.com/questions/8978080/htaccess-exclude-one-url-from-basic-auth