1

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

asgeo1
  • 135
  • 1
  • 9

1 Answers1

0

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

retracile
  • 1,260
  • 7
  • 10