2

I want to put the a server under apache_basic authentication, I added HTTP auth to the root of the server using this

<Location />
   AuthType Basic
   AuthName "Authentication"
   AuthBasicProvider file
   AuthUserFile /etc/authdb
   Require valid-user
</Location>

now this works fine, and it authenticate everyone in.

now I have uploadify which is flash, and used to upload images to the server. So as this is flash, the requests sent to the server get 401 errors, and I want to do the authentication expect the uploadify URLs.

I added more configs to the httpd.conf which is this

<Location */UploadifyForm/*>
   AuthType None
   Require all granted
</Location>

but this doesnt work, any one knows a solution for this please ?

1 Answer 1

1

If UploadifyForm is under the root of your server these two directives should do the trick:

<Location "/">
    AuthType Basic
    AuthName "Authentication"
    AuthBasicProvider file
    AuthUserFile /etc/authdb
    Require valid-user
</Location>
<Location "/UploadifyForm">
    AuthType None
    Require all granted
</Location>

Note that of your resources are on a filesystem, it is better to use Directory directives instead of Location ones. You can find more info in the Apache documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.