Skip to content

Using AuthType Basic not working with Crowdsec On #14

@therealmaxmouse

Description

@therealmaxmouse

I used "AuthType Basic" on a "Directory" block within a "VirtualHost" while mod_crowdsec has "Crowdsec" set to "On" but the expected password prompt is not displayed when I go to the website in a browser. Instead I receive an immediate "401 Unauthorized - This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required."

Also, the following entry appears in the Apache error log:

[Wed Jan 07 06:38:06.477717 2026] [crowdsec:error] [pid 152546:tid 139897746548480] [client {{ MY_IP }}:64178] crowdsec: service 'http://{{ LAPI_HOST }}:8080/v1/decisions?ip={{ MY_IP }}' returned 401, request rejected: /

If I disable mod_crowdsec by changing the "Crowdsec" setting to "Off" then "AuthType Basic" starts working correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions