Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My Trac system has basic http authentication, configured like so:

AuthType Basic
AuthName "TRAC"
AuthUserFile /var/trac/trac-auth-file
Require valid-user

This works in that it prompts for a username and password and only allows the user to access Trac if their credentials are validated.

Failing to provide any credentials (i.e. pressing cancel on the prompt) gives a 401 Authorization Required error.

However, what I actually want to happen is instead of a 401, it just allows the user access as an anonymous user.

The Trac system itself supports an anonymous user - in the trac permissions settings, there are a whole heap of privileges that can be configured for anonymous users.

I just don't know how (or even if it is possible) to configure the htaccess so a htpasswd file is used, but have it fall back to anonymous access rather than error with a 401

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You need two sections in your Apache config. Read this section from the Trac site; I think it will help you.

share|improve this answer
    
Thanks, it works –  asgeo1 Jan 12 '10 at 2:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.